-
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
Selecting a pipenv environment not working? #1639
Comments
I noticed that the helper text for "python.venvPath" is: "Path to folder with a list of Virtual Environments". So, I updated that config setting to simply: {
"python.venvPath": "/Users/dfee/.local/share/virtualenvs"
} I'm not sure what that setting actually does. I'm still unable to select an interpreter. |
Note: This is an error returned by one of the packages that |
Ah, I noticed that the correct setting is "python.pythonPath". I set it, and it works. I'm still not clear why the GUI option doesn't work. {
"python.venvPath": "/Users/dfee/.local/share/virtualenvs",
"python.pythonPath": "/Users/dfee/.local/share/virtualenvs/sqlademo-d4pSLlIn"
} I now really don't understand why I would supply "python.venvPath". But alas, I have an interpreter selected. For what it's worth, I didn't have to go through manually configuring the "python.pythonPath" setting like a month ago. |
@DonJayamanne sorry for being dense here, but when you say initialize those variables, are you suggesting I simply export those variables in a shell, and launch $ export LC_ALL=en_US.utf-8
$ export LANG=en_US.utf-8
$ code-insiders That works... I'm just wondering if there is a way to configure VSCode to do this itself? I presume it's not this, and I can't find any other relevant settings with a search for "environment". // Object with environment variables that will be added to the VS Code process to be used by the terminal on OS X
"terminal.integrated.env.osx": {}, |
Since you are using a mac, please could you try initializing those variables in your |
I tried that, and it didn't work. I don't know why it would work either, as that isn't how environment variables are inherited in child processes. Is VSCode reading in my ~/.bash_profile at some point during initialization?
|
To be honest, I don't really know how environment variables are defined for GUI apps on OSX. |
@DonJayamanne OSX is a strange beast. I don't know. I didn't get the error when starting up VSCode (not from the terminal, and after adding those two configurations to my So, I think we can move on from the |
Please could you try the following:
|
|
I'm no longer getting that I created another video. This video contains:
|
@dfee, sorry for the delay in getting back to you. If the extension detects a pipenv then only that pipenv is used. Any other virtualenvs (or other Python interpreters) are ignored. In order to see other interpreters (e.g. in virtual envs), you must delete the pipfile. So if you have a pipenv set up for the project then that should be the only interpreter you can select. From your description it sounds like that's the situation. Please verify. |
I just opened #1800 to track the removal of hiding other interpreters when using pipenv. |
@ericsnowcurrently correct. I'll defer to you whether to close (up to your process). |
I'm going to close then in favour of the feature request. Thanks for your patience in explaining the issue, @dfee . |
Actual behavior
Inability to select my Python interpreter
Expected behavior
Expected the ability to select my Python interpreter
Steps to reproduce:
Input an interpreter to "Select Python Interpreter": https://youtu.be/QdZXOEWS7LQ (1min recording)
Logs
Output from
Console
under theDeveloper Tools
panel (toggle Developer Tools on underHelp
)After re-opening the editor I get the following message:
The text was updated successfully, but these errors were encountered: