-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Explain once and for all how to set python.pythonPath using environment variables or remove this from docs #10533
Comments
@smac89, thanks for getting in touch with us about this. We'll get back to you as soon as possible. |
I think I'm facing the same issue. |
@smac89, I was able to verify the behavior as described: any setting using an environment variable defined only in a The cause is that the extension code which applies environment variables in settings does not currently use those defined in The resolution of the problem you've encountered is one of the following:
We'll look into which makes the most sense. |
Thanks @ericsnowcurrently |
Thanks for bringing this up! We'll update the docs accordingly. FWIW, we're also deprecating the python.pythonPath setting (#2125). Closing in favour of microsoft/vscode-docs#3550 and #11015. |
Environment data
python.languageServer
setting: MicrosoftExpected behaviour
From reading the docs, it seems to suggest that one can set
python.pythonPath
using environment variable.I have a
.env
file with the content:And I have set the value of
python.pythonPath
using:I expect the plugin to pick up the actual path from the environment variable and use that python
Actual behaviour
The plugin fails to see the python I specified and instead picks up the system default python, which means the variable is resolving to an empty string
Steps to reproduce:
Use my setup above, with the
.env
file.Directory structure
Logs
Output for
Python
in theOutput
panel (View
→Output
, change the drop-down the upper-right of theOutput
panel toPython
)In case I'm not making myself clear, I am referring to where it states in the docs:
I'm certain this means that the extension is supposed to read the
.env
file and use the values found there. If that's the case, why does it fail to use the environment variables I set, to fill inpython.pythonPath
?I just need to know if this feature is supported or not and what the docs means when it specifies the use of environment variables for setting the
python.pythonPath
. If this is actually not supported, then I strongly suggest it should be, otherwise it should not be in the docs so that devs are not being misled and end up wasting time on something that wasn't supposed to work.See also:
#944 (comment)
The text was updated successfully, but these errors were encountered: