-
Notifications
You must be signed in to change notification settings - Fork 768
Closed
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 found that there were issues with the environment variables
Environment.SetEnvironmentVariable("AA","BB");
Runtime.PythonDLL = @"D:\Program Files\Python312\python312.dll";
PythonEngine.Initialize();
PythonEngine.RunSimpleString("""
import os
for e in os.environ:
print(e,':', os.environ[e])
""");no 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?
Metadata
Metadata
Assignees
Labels
No labels