Skip to content

Python 3.10 Conda environment not detected #18110

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

Closed
1 task done
rchiodo opened this issue Dec 3, 2021 · 3 comments
Closed
1 task done

Python 3.10 Conda environment not detected #18110

rchiodo opened this issue Dec 3, 2021 · 3 comments
Labels
bug Issue identified by VS Code Team member as probable bug

Comments

@rchiodo
Copy link

rchiodo commented Dec 3, 2021

VS Code version

1.63-insiders

Extension version

2021.12.1522449417-dev

OS type

Windows

OS version

Windows 10

Python distribution

Anaconda

Python version

3.10

Language server

Pylance

Expected behaviour

Conda environment should be detected.

I have this conda environment:

(conda310) C:\Users\aku91>conda info

     active environment : conda310
    active env location : C:\Users\aku91\miniconda3\envs\conda310
            shell level : 2
       user config file : C:\Users\aku91\.condarc
 populated config files :
          conda version : 4.10.3
    conda-build version : not installed
         python version : 3.8.5.final.0
       virtual packages : __cuda=11.1=0
                          __win=0=0
                          __archspec=1=x86_64
       base environment : C:\Users\aku91\miniconda3  (writable)
      conda av data dir : C:\Users\aku91\miniconda3\etc\conda
  conda av metadata url : None
           channel URLs : https://repo.anaconda.com/pkgs/main/win-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/win-64
                          https://repo.anaconda.com/pkgs/r/noarch
                          https://repo.anaconda.com/pkgs/msys2/win-64
                          https://repo.anaconda.com/pkgs/msys2/noarch
          package cache : C:\Users\aku91\miniconda3\pkgs
                          C:\Users\aku91\.conda\pkgs
                          C:\Users\aku91\AppData\Local\conda\conda\pkgs
       envs directories : C:\Users\aku91\miniconda3\envs
                          C:\Users\aku91\.conda\envs
                          C:\Users\aku91\AppData\Local\conda\conda\envs
               platform : win-64
             user-agent : conda/4.10.3 requests/2.25.1 CPython/3.8.5 Windows/10 Windows/10.0.19041
          administrator : False
             netrc file : C:\Users\aku91/.netrc
           offline mode : False


(conda310) C:\Users\aku91>

Actual behaviour

Doesn't show up in the list of interpreters.

Steps to reproduce

I created it from a base environment that was 3.8.5 by running this:

conda create -n conda310 python==3.10

Logs

Experiment 'pythonaa' is active
Experiment 'pythonTensorboardExperiment' is active
Experiment 'PythonPyTorchProfiler' is active
Experiment 'pythonDeprecatePythonPath' is active
Experiment 'pythonRunFailedTestsButtonDisplayed' is active
Experiment 'pythonRefreshTestsButtonDisplayed' is active
Experiment 'pythonRememberDebugConfig' is active

conda info --json
~\AppData\Local\Microsoft\WindowsApps\python3.9.exe ~.vscode-insiders\extensions\ms-python.python-2021.12.1522449417-dev\pythonFiles\interpreterInfo.py
~\miniconda3\envs\condaEnvTest\python.exe ~.vscode-insiders\extensions\ms-python.python-2021.12.1522449417-dev\pythonFiles\interpreterInfo.py
Python interpreter path: ~\miniconda3\envs\condaEnvTest\python.exe
d:\Source\Testing_6\TestEnv2\Scripts\python.exe ~.vscode-insiders\extensions\ms-python.python-2021.12.1522449417-dev\pythonFiles\interpreterInfo.py
~\miniconda3\Scripts\conda.exe info --json
~\miniconda3\python.exe ~.vscode-insiders\extensions\ms-python.python-2021.12.1522449417-dev\pythonFiles\interpreterInfo.py
~\AppData\Local\Programs\Python\Python39\python.exe ~.vscode-insiders\extensions\ms-python.python-2021.12.1522449417-dev\pythonFiles\interpreterInfo.py
\AppData\Local\Programs\Python\Python39-32\python.exe .vscode-insiders\extensions\ms-python.python-2021.12.1522449417-dev\pythonFiles\interpreterInfo.py
D:\Source\PTVS_Pylance\Python\Tests\HelloWorld\HelloWorld.pyproj .vscode-insiders\extensions\ms-python.python-2021.12.1522449417-dev\pythonFiles\interpreterInfo.py
"C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_86\python.exe" .vscode-insiders\extensions\ms-python.python-2021.12.1522449417-dev\pythonFiles\interpreterInfo.py
"
\miniconda3\Scripts\activate && conda activate condaEnvTest && echo 'e8b39361-0157-4923-80e1-22d70d46dee6' && python c:\Users\aku91.vscode-insiders\extensions\ms-python.python-2021.12.1522449417-dev\pythonFiles\printEnvVariables.py"
"
\miniconda3\Scripts\activate && conda activate condaEnvTest && echo 'e8b39361-0157-4923-80e1-22d70d46dee6' && python c:\Users\aku91.vscode-insiders\extensions\ms-python.python-2021.12.1522449417-dev\pythonFiles\printEnvVariables.py"
"
\miniconda3\Scripts\activate && conda activate condaEnvTest && echo 'e8b39361-0157-4923-80e1-22d70d46dee6' && python c:\Users\aku91.vscode-insiders\extensions\ms-python.python-2021.12.1522449417-dev\pythonFiles\printEnvVariables.py"
"
\miniconda3\Scripts\activate && conda activate condaEnvTest && echo 'e8b39361-0157-4923-80e1-22d70d46dee6' && python c:\Users\aku91.vscode-insiders\extensions\ms-python.python-2021.12.1522449417-dev\pythonFiles\printEnvVariables.py"
C:\Users\Rich.julia\conda\3\python.exe ~.vscode-insiders\extensions\ms-python.python-2021.12.1522449417-dev\pythonFiles\interpreterInfo.py
~\miniconda3\envs\conda310\python.exe ~.vscode-insiders\extensions\ms-python.python-2021.12.1522449417-dev\pythonFiles\interpreterInfo.py
~\miniconda3\envs\env\python.exe ~.vscode-insiders\extensions\ms-python.python-2021.12.1522449417-dev\pythonFiles\interpreterInfo.py
~\miniconda3\envs\golden_scenario_env\python.exe ~.vscode-insiders\extensions\ms-python.python-2021.12.1522449417-dev\pythonFiles\interpreterInfo.py
~\miniconda3\envs\ipykernel_test\python.exe ~.vscode-insiders\extensions\ms-python.python-2021.12.1522449417-dev\pythonFiles\interpreterInfo.py
~\miniconda3\envs\jupyterlabTest\python.exe ~.vscode-insiders\extensions\ms-python.python-2021.12.1522449417-dev\pythonFiles\interpreterInfo.py
~\miniconda3\envs\python36\python.exe ~.vscode-insiders\extensions\ms-python.python-2021.12.1522449417-dev\pythonFiles\interpreterInfo.py
~\miniconda3\envs\python38_py2exe\python.exe ~.vscode-insiders\extensions\ms-python.python-2021.12.1522449417-dev\pythonFiles\interpreterInfo.py
~\miniconda3\envs\python38_pyinstaller\python.exe ~.vscode-insiders\extensions\ms-python.python-2021.12.1522449417-dev\pythonFiles\interpreterInfo.py
~\miniconda3\envs\testEmpty\python.exe ~.vscode-insiders\extensions\ms-python.python-2021.12.1522449417-dev\pythonFiles\interpreterInfo.py
~\miniconda3\envs\testSysPath\python.exe ~.vscode-insiders\extensions\ms-python.python-2021.12.1522449417-dev\pythonFiles\interpreterInfo.py
Starting Pylance language server.

Code of Conduct

  • I agree to follow this project's Code of Conduct
@rchiodo rchiodo added bug Issue identified by VS Code Team member as probable bug triage-needed Needs assignment to the proper sub-team labels Dec 3, 2021
@rchiodo
Copy link
Author

rchiodo commented Dec 3, 2021

You can see that it tries getting the interpreter info:

~\miniconda3\envs\conda310\python.exe ~.vscode-insiders\extensions\ms-python.python-2021.12.1522449417-dev\pythonFiles\interpreterInfo.py

but I don't see it in my interpreter list:

image

@karthiknadig
Copy link
Member

This is due to a bug in conda. duplicate of conda/conda#11072

workaround is to use the conda forge channel:

conda create -p conda_py310cf --channel conda-forge python=3.10

@karthiknadig
Copy link
Member

Related #17941

@karthiknadig karthiknadig removed the triage-needed Needs assignment to the proper sub-team label Dec 6, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

No branches or pull requests

2 participants