-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Can't select Anaconda virtual environment Python 3.10 interpreter #17941
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
Comments
@duncantop what happens when you run from a command prompt outside of vscode.
|
If I type out the tildes:
|
I have same problem |
Same issue here, even when setting the 3.10 conda environment as default interpreter. |
On Win10, using miniconda and have the same issue with 3.10 not showing up |
This is strange, running anything with conda python 3.10 seems to be not working. But 3.9 it does return what we expect.
The reason this is not working is because we are not able to get any info from the python.exe. when we run the script below it is not returning anything with conda python 3.10.
but it does with 3.9:
|
We have diagnosed the issue: Python 3.10 builds from conda require all commands be run through an activated environment (otherwise it raises an error about not being able to find To work around this until we can get it properly fixed you can launch VS Code from an activated conda environment in the terminal (which also deals with any race condition issues in the terminal itself as well; something we are planning to fix with #11039 ). Unfortunately fixing this is going to require two parts due to the fact that we now have to use
|
Thanks for looking into this, supplying a work around, and describing the path forward for this issue. |
Some additional info (for what it is worth), this does not happen with all conda builds of python3.10... When creating a new conda env for py3.10 the "naive way" However, when creating a conda env "specifying conda-forge channel" When doing a
vs
Don't know if this helps to narrow down the issue / root-cause but it would trigger me to reach out to the anaconda guys to try and understand why this difference is seen |
Some more info.... the python3.10 installed by explicitely specifying conda-forge seems to be more recent...
vs
|
VS Code version
1.62.0
Extension version
v2021.11.1422169775
OS type
Windows
OS version
10
Python distribution
Anaconda
Python version
3.10.0
Language server
Pylance
Expected behaviour
I should be able to see and select my py310 anaconda python installation.
Actual behaviour
When selecting a python interpreter, I see my list of non-3.10 environments but only briefly see my py310 environment at the bottom of the list before it disappears. When I have forced the interpreter to my py310 install vscode still asks me to select an interpreter.
Steps to reproduce
No matter how I create a new anaconda environment with python 3.10, the same thing happens. I have tried making new non-3.10 environments and they show up in the interpreter list and are usable. Issue seems exclusive to python 3.10.
Logs
Experiment 'pythonaa' is active
Experiment 'pythonTensorboardExperiment' is active
Experiment 'pythonSurveyNotification' is active
Experiment 'PythonPyTorchProfiler' is active
Experiment 'pythonDeprecatePythonPath' is active
Experiment 'pythonRunFailedTestsButtonDisplayed' is active
Experiment 'pythonRefreshTestsButtonDisplayed' is active
Experiment 'pythonRememberDebugConfig' is active
Code of Conduct
The text was updated successfully, but these errors were encountered: