Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Environment variables are not synchronized#2539

gitlsl started this conversation inGeneral
Discussion options

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 inhttps://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?

You must be logged in to vote

Replies: 0 comments

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Category
General
Labels
None yet
1 participant
@gitlsl
Converted from issue

This discussion was converted from issue #2538 on January 04, 2025 19:32.


[8]ページ先頭

©2009-2025 Movatter.jp