Title: Environment variables are not synchronized · Issue #2538 · pythonnet/pythonnet · GitHub
Open Graph Title: Environment variables are not synchronized · Issue #2538 · pythonnet/pythonnet
X Title: Environment variables are not synchronized · Issue #2538 · pythonnet/pythonnet
Description: Environment Pythonnet version:3.0.5 Python version:3.12 Operating System:win11 .NET Runtime:.net8 Details Describe what you were trying to get done. I tested the virtual environment created with Poetry and it always failed. The test foun...
Open Graph Description: Environment Pythonnet version:3.0.5 Python version:3.12 Operating System:win11 .NET Runtime:.net8 Details Describe what you were trying to get done. I tested the virtual environment created with Po...
X Description: Environment Pythonnet version:3.0.5 Python version:3.12 Operating System:win11 .NET Runtime:.net8 Details Describe what you were trying to get done. I tested the virtual environment created with Po...
Opengraph URL: https://github.com/pythonnet/pythonnet/issues/2538
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Environment variables are not synchronized","articleBody":"### Environment\r\n\r\n- Pythonnet version:3.0.5\r\n- Python version:3.12\r\n- Operating System:win11\r\n- .NET Runtime:.net8\r\n\r\n### Details\r\n\r\n- Describe what you were trying to get done.\r\n\r\n I tested the virtual environment created with Poetry and it always failed. The test found that there were issues with the environment variables\r\n\r\n \r\n```python\r\nEnvironment.SetEnvironmentVariable(\"AA\",\"BB\");\r\n\r\nRuntime.PythonDLL = @\"D:\\Program Files\\Python312\\python312.dll\";\r\nPythonEngine.Initialize();\r\n\r\nPythonEngine.RunSimpleString(\"\"\"\r\n\r\n import os\r\n \r\n for e in os.environ:\r\n print(e,':', os.environ[e])\r\n \"\"\");\r\n```\r\nno AA in os.environ, so Environment variables in https://github.com/pythonnet/pythonnet/wiki/Using-Python.NET-with-Virtual-Environments no effect, So it leads to the inability to call Python in virtual environments?\r\n\r\n","author":{"url":"https://github.com/gitlsl","@type":"Person","name":"gitlsl"},"datePublished":"2025-01-04T13:29:57.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/2538/pythonnet/issues/2538"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:3b716fa2-6145-34a1-97df-ab4f4cec6572 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C3CE:3891C0:107872:167BA0:696FFA95 |
| html-safe-nonce | fc1b34bd2142fd444f794f30c9b8e3a6f810e0262d35e83f60ee6015967eba08 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDM0NFOjM4OTFDMDoxMDc4NzI6MTY3QkEwOjY5NkZGQTk1IiwidmlzaXRvcl9pZCI6IjU0MzA2MzQ2NDMxNDI0NzQzODkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 86609d63151500ce432ac1862d64e39d9fe086504c2115ab2f553f9c1ec7c9f7 |
| hovercard-subject-tag | issue:2768845067 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/pythonnet/pythonnet/2538/issue_layout |
| twitter:image | https://opengraph.githubassets.com/daf17597923e372ea3098e590cbff05cad7ac181d2f77b2cc48b5c0c120013ee/pythonnet/pythonnet/issues/2538 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/daf17597923e372ea3098e590cbff05cad7ac181d2f77b2cc48b5c0c120013ee/pythonnet/pythonnet/issues/2538 |
| og:image:alt | Environment Pythonnet version:3.0.5 Python version:3.12 Operating System:win11 .NET Runtime:.net8 Details Describe what you were trying to get done. I tested the virtual environment created with Po... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | gitlsl |
| hostname | github.com |
| expected-hostname | github.com |
| None | 61db99bbb6a7517db80567029869280bdefa9fa883092d6c2aa07ec4ea15f359 |
| turbo-cache-control | no-preview |
| go-import | github.com/pythonnet/pythonnet git https://github.com/pythonnet/pythonnet.git |
| octolytics-dimension-user_id | 6050430 |
| octolytics-dimension-user_login | pythonnet |
| octolytics-dimension-repository_id | 14748123 |
| octolytics-dimension-repository_nwo | pythonnet/pythonnet |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 14748123 |
| octolytics-dimension-repository_network_root_nwo | pythonnet/pythonnet |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 91ceb31fcdebd150222e05551caf4a28f9532341 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width