Skip to content

invalid python Interpreter for conda virtual environment #25650

Description

@yjobic

Behaviour

I've got the following message when selecting a python interpreter inside a conda env.

An Invalid Python interpreter is selected, please try changing it to enable features such as IntelliSense, linting, and debugging. See output for more details regarding why the interpreter is invalid.

Steps to reproduce:

  1. Select Interpreter
  2. Choose the python interpreter inside a conda env

Diagnostic data

Version VSC windows, conda installer on WSL.
  • VSC 1.107.0 :
Version: 1.107.0 (user setup) Commit: 618725e67565b290ba4da6fe2d29f8fa1d4e3622 Date: 2025-12-10T07:43:47.883Z Electron: 39.2.3 ElectronBuildId: 12895514 Chromium: 142.0.7444.175 Node.js: 22.21.1 V8: 14.2.231.21-electron.0 OS: Windows_NT x64 10.0.26200
  • Python extension
Identifier ms-python.python Version 2025.20.0
  • settings.json :
    {
    "python.experiments.enabled": false,
    "python.terminal.activateEnvironment": true,
    "python.useEnvironmentsExtension ": false,
    "python.terminal.activateEnvInCurrentTerminal": true,
    "python.terminal.shellIntegration.enabled": false
    }

In the VSC terminal :

(base) yann@DESKTOP-GBCFM9K:~/ChangmtPhaseWindows/methode_diff_finie$ conda info

     active environment : base
    active env location : /home/yann/miniconda3
            shell level : 3
       user config file : /home/yann/.condarc
 populated config files : /home/yann/miniconda3/.condarc
                          /home/yann/miniconda3/condarc.d/anaconda-auth.yml
                          /home/yann/.condarc
          conda version : 25.11.0
    conda-build version : not installed
         python version : 3.13.11.final.0
                 solver : libmamba (default)
       virtual packages : __archspec=1=skylake
                          __conda=25.11.0=0
                          __cuda=12.8=0
                          __glibc=2.39=0
                          __linux=6.6.87.2=0
                          __unix=0=0
       base environment : /home/yann/miniconda3  (writable)
      conda av data dir : /home/yann/miniconda3/etc/conda
  conda av metadata url : None
           channel URLs : https://conda.anaconda.org/conda-forge/linux-64
                          https://conda.anaconda.org/conda-forge/noarch
                          https://repo.anaconda.com/pkgs/main/linux-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/linux-64
                          https://repo.anaconda.com/pkgs/r/noarch
          package cache : /home/yann/miniconda3/pkgs
                          /home/yann/.conda/pkgs
       envs directories : /home/yann/miniconda3/envs
                          /home/yann/.conda/envs
               platform : linux-64
             user-agent : conda/25.11.0 requests/2.32.5 CPython/3.13.11 Linux/6.6.87.2-microsoft-standard-WSL2 ubuntu/24.04.3 glibc/2.39 solver/libmamba conda-libmamba-solver/25.11.0 libmambapy/2.4.0 aau/0.7.5 c/. s/. e/.
                UID:GID : 1000:1000
             netrc file : None
           offline mode : False

I can change the conda env in the terminal :

(base) yann@DESKTOP-GBCFM9K:~/ChangmtPhaseWindows/methode_diff_finie$ conda activate phasechange
(phasechange) yann@DESKTOP-GBCFM9K:~/ChangmtPhaseWindows/methode_diff_finie$ 

I can use the python Interpreter:

(phasechange) yann@DESKTOP-GBCFM9K:~/ChangmtPhaseWindows/methode_diff_finie$ ~/miniconda3/envs/phasechange/bin/python -V
Python 3.14.2

The conda info are:

(phasechange) yann@DESKTOP-GBCFM9K:~/ChangmtPhaseWindows/methode_diff_finie$ ~/miniconda3/bin/conda info --json
{'platform': 'linux-64', 'conda_version': '25.11.0', 'conda_env_version': '25.11.0', 'conda_build_version': 'not installed', 'root_prefix': '/home/yann/miniconda3', 'conda_prefix': '/home/yann/miniconda3', 'av_data_dir': '/home/yann/miniconda3/etc/conda', 'av_metadata_url_base': None, 'root_writable': True, 'pkgs_dirs': ('/home/yann/miniconda3/pkgs', '/home/yann/.conda/pkgs'), 'envs_dirs': ('/home/yann/miniconda3/envs', '/home/yann/.conda/envs'), 'default_prefix': '/home/yann/miniconda3/envs/phasechange', 'active_prefix': '/home/yann/miniconda3/envs/phasechange', 'active_prefix_name': 'phasechange', 'conda_shlvl': 4, 'channels': ['https://conda.anaconda.org/conda-forge/linux-64', 'https://conda.anaconda.org/conda-forge/noarch', 'https://repo.anaconda.com/pkgs/main/linux-64', 'https://repo.anaconda.com/pkgs/main/noarch', 'https://repo.anaconda.com/pkgs/r/linux-64', 'https://repo.anaconda.com/pkgs/r/noarch'], 'user_rc_path': '/home/yann/.condarc', 'rc_path': '/home/yann/.condarc', 'sys_rc_path': '/home/yann/miniconda3/.condarc', 'offline': False, 'envs': ['/home/yann/miniconda3', '/home/yann/miniconda3/envs/fenicsx-env', '/home/yann/miniconda3/envs/phasechange'], 'python_version': '3.13.11.final.0', 'requests_version': '2.32.5', 'user_agent': 'conda/25.11.0 requests/2.32.5 CPython/3.13.11 Linux/6.6.87.2-microsoft-standard-WSL2 ubuntu/24.04.3 glibc/2.39 solver/libmamba conda-libmamba-solver/25.11.0 libmambapy/2.4.0 aau/0.7.5 c/_-bbeq4clMbwnt7rR0FWwD s/lOdYzI807_ecs8G6qPM0XZ e/rihRGyZ540k-mRDymkQTfi', 'conda_location': '/home/yann/miniconda3/lib/python3.13/site-packages/conda', 'config_files': (PosixPath('/home/yann/miniconda3/.condarc'), PosixPath('/home/yann/miniconda3/condarc.d/anaconda-auth.yml'), PosixPath('/home/yann/.condarc')), 'netrc_file': None, 'virtual_pkgs': [['__archspec', '1', 'skylake'], ['__conda', '25.11.0', '0'], ['__cuda', '12.8', '0'], ['__glibc', '2.39', '0'], ['__linux', '6.6.87.2', '0'], ['__unix', '0', '0']], 'solver': {'name': 'libmamba', 'user_agent': 'solver/libmamba conda-libmamba-solver/25.11.0 libmambapy/2.4.0', 'default': True}, 'UID': 1000, 'GID': 1000, 'sys.version': '3.13.11 | packaged by conda-forge | (main, Dec  6 2025, 11:24:03) [GCC 14.3.0]', 'sys.prefix': '/home/yann/miniconda3', 'sys.executable': '/home/yann/miniconda3/bin/python', 'site_dirs': [], 'env_vars': {'PATH': '/home/yann/.vscode-server/bin/618725e67565b290ba4da6fe2d29f8fa1d4e3622/bin/remote-cli:/home/yann/miniconda3/envs/phasechange/bin:/home/yann/miniconda3/condabin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/wsl/lib:/mnt/c/Program Files/WindowsApps/MicrosoftCorporationII.WindowsSubsystemForLinux_2.6.1.0_x64__8wekyb3d8bbwe:/mnt/c/Program Files (x86)/Common Files/Oracle/Java/javapath:/mnt/c/Program Files/Microsoft MPI/Bin:/mnt/c/Windows/system32:/mnt/c/Windows:/mnt/c/Windows/System32/Wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0:/mnt/c/Windows/System32/OpenSSH:/mnt/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/mnt/c/Program Files/PuTTY:/mnt/c/WINDOWS/system32:/mnt/c/WINDOWS:/mnt/c/WINDOWS/System32/Wbem:/mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0:/mnt/c/WINDOWS/System32/OpenSSH:/mnt/c/Program Files/dotnet:/mnt/c/Program Files/Git/cmd:/mnt/d/MATLAB/R2023b/runtime/win64:/mnt/d/MATLAB/R2023b/bin:/mnt/c/Program Files/Wolfram Research/WolframScript:/mnt/c/Program Files (x86)/Windows Kits/10/Windows Performance Toolkit:/mnt/d/Softs/LLNL/VisIt3.4.0:/mnt/c/Users/yann/AppData/Local/Microsoft/WindowsApps:/mnt/d/MiKTeX/miktex/bin/x64:/mnt/d/Softs/Microsoft VS Code/bin:/mnt/d/Qt/Tools/mingw810_64/bin:/snap/bin:/home/yann/.vscode-server/extensions/ms-python.debugpy-2025.16.0/bundled/scripts/noConfigScripts', 'BUNDLED_DEBUGPY_PATH': '/home/yann/.vscode-server/extensions/ms-python.debugpy-2025.16.0/bundled/libs/debugpy', 'CIO_TEST': '<not set>', 'CONDA_PROMPT_MODIFIER': '(phasechange) ', 'CONDA_PREFIX': '/home/yann/miniconda3/envs/phasechange', 'CONDA_PREFIX_3': '/home/yann/miniconda3', 'LD_PRELOAD': '<not set>', 'CONDA_SHLVL': '4', 'SSL_CERT_FILE': '<not set>', 'CURL_CA_BUNDLE': '<not set>', 'REQUESTS_CA_BUNDLE': '<not set>', 'CONDA_EXE': '/home/yann/miniconda3/bin/conda', 'CONDA_DEFAULT_ENV': 'phasechange', 'CONDA_ROOT': '/home/yann/miniconda3', 'CONDA_PREFIX_2': '/home/yann/miniconda3/envs/phasechange', 'CONDA_PREFIX_1': '/home/yann/miniconda3', 'CONDA_PYTHON_EXE': '/home/yann/miniconda3/bin/python'}, 'envs_details': {'/home/yann/miniconda3': {'name': 'base', 'created': None, 'last_modified': '2025-12-11T08:15:46.447826+00:00', 'active': False, 'base': True, 'frozen': False, 'writable': True}, '/home/yann/miniconda3/envs/fenicsx-env': {'name': 'fenicsx-env', 'created': None, 'last_modified': '2025-11-20T08:29:12.222127+00:00', 'active': False, 'base': False, 'frozen': False, 'writable': True}, '/home/yann/miniconda3/envs/phasechange': {'name': 'phasechange', 'created': None, 'last_modified': '2025-12-11T08:15:03.656585+00:00', 'active': True, 'base': False, 'frozen': False, 'writable': True}}}(phasechange) 

Output for Python in the Output

panel 2025-12-11 10:50:49.029 [info] Native locator: Refresh started
2025-12-11 10:50:49.029 [info] Native locator: Refresh started
2025-12-11 10:50:49.029 [info] Skipping ActivatedEnv Detection: process.env.VSCODE_CLI !== '1'
2025-12-11 10:50:49.033 [info] > pyenv which python
2025-12-11 10:50:49.034 [info] cwd: .
2025-12-11 10:50:49.180 [info] Conda environment manager found at: /home/yann/miniconda3/bin/conda
2025-12-11 10:50:49.180 [info] Using conda: /home/yann/miniconda3/bin/conda
2025-12-11 10:50:49.188 [info] > ~/miniconda3/bin/conda info --json
2025-12-11 10:50:50.833 [info] Native locator: Refresh finished in 2414 ms
2025-12-11 10:50:52.552 [info] Starting Pylance language server.
2025-12-11 10:51:00.684 [info] Native locator: Refresh started
2025-12-11 10:51:00.694 [info] Conda environment manager found at: /home/yann/miniconda3/bin/conda
2025-12-11 10:51:00.694 [info] Conda set to: /home/yann/miniconda3/bin/conda
2025-12-11 10:51:02.833 [info] Native locator: Refresh finished in 2149 ms
2025-12-11 10:52:47.133 [info] > ~/miniconda3/bin/conda info --json
2025-12-11 10:53:36.295 [info] Native locator: Refresh started
2025-12-11 10:53:36.301 [info] > ~/miniconda3/bin/conda info --json
2025-12-11 10:53:36.308 [info] Conda environment manager found at: /home/yann/miniconda3/bin/conda
2025-12-11 10:53:36.308 [info] Conda set to: /home/yann/miniconda3/bin/conda
2025-12-11 10:53:38.501 [info] Native locator: Refresh finished in 2205 ms
2025-12-11 10:55:06.381 [info] > ~/miniconda3/bin/conda info --json

Activity

  1. yjobic commented on Dec 11, 2025

    @yjobic
    Author

    I can add the python locator output:
    2025-12-11 11:15:02.840 [info] Discovered manager: (Conda) /home/yann/miniconda3/bin/conda
    2025-12-11 11:15:02.841 [info] Discovered env: /home/yann/miniconda3/envs/phasechange/bin/python
    2025-12-11 11:15:02.845 [info] Discovered env: /usr/bin/python3
    2025-12-11 11:15:02.845 [info] Discovered env: /bin/python3
    2025-12-11 11:15:04.973 [info] Discovered env: /home/yann/miniconda3/bin/python
    2025-12-11 11:15:04.974 [info] Discovered env: /home/yann/miniconda3/envs/fenicsx-env/bin/python
    2025-12-11 11:15:04.974 [info] Locator Conda took 2.140131732s
    2025-12-11 11:15:04.974 [info] Locator Homebrew took 48.543µs
    2025-12-11 11:15:04.974 [info] Locator LinuxGlobal took 6.679713ms
    2025-12-11 11:15:04.974 [info] Locator PipEnv took 47.423µs
    2025-12-11 11:15:04.974 [info] Locator Pixi took 15.977µs
    2025-12-11 11:15:04.974 [info] Locator Poetry took 39.633042ms
    2025-12-11 11:15:04.974 [info] Locator PyEnv took 36.032406ms
    2025-12-11 11:15:04.974 [info] Locator Venv took 21.575µs
    2025-12-11 11:15:04.974 [info] Locator VirtualEnv took 39.994µs
    2025-12-11 11:15:04.974 [info] Locator VirtualEnvWrapper took 44.982µs
    2025-12-11 11:15:04.974 [info] Locator GlobalVirtualEnvs took 562.57µs
    2025-12-11 11:15:04.974 [info] Locator Locators took 2.141370344s
    2025-12-11 11:15:04.974 [info] Locator Path took 320.681861ms
    2025-12-11 11:15:04.974 [info] Locator Workspaces took 23.679258ms
    2025-12-11 11:15:04.975 [info] Refresh completed in 2141ms
    2025-12-11 11:15:17.880 [info] Resolved Python Environment /home/yann/miniconda3/envs/fenicsx-env/bin/python

  2. flaviosantoshidromod commented on Dec 11, 2025

    @flaviosantoshidromod

    Hello friend, did you figure it out? I'm having the same issue, immediately after VSCode updated to 1.107. Not sure if it's an extension issue or VS issue

    #25652

  3. yjobic commented on Dec 11, 2025

    @yjobic
    Author

    Note yet. It was working fine last week. I'll test it at home this evening to see if i have this problem on my other computers.

  4. added
    bugIssue identified by VS Code Team member as probable bug
    and removed
    triage-neededNeeds assignment to the proper sub-team
    on Dec 11, 2025
  5. anthonykim1 commented on Dec 11, 2025

    @anthonykim1

    Is it any better when
    Try install https://marketplace.visualstudio.com/items?itemName=ms-python.vscode-python-envs

    Can you update Python extension, Python environment extension to latest and see if you can still repro?
    Also add "python.useEnvironmentsExtension": true, to your settings.json.

    Please file issue on https://github.com/microsoft/vscode-python-environments/issues if you see problem again,

  6. flaviosantoshidromod commented on Dec 12, 2025

    @flaviosantoshidromod

    I rolled back the Python Environments extension to Pre-Release Version, and it seemed to have worked

  7. AcharyaS97 commented on Dec 17, 2025

    @AcharyaS97

    I've been seeing the issue today trying to select my python 3.10.19 interpreter inside my conda environment. Tried rolling back python environments extension to prerelease and no luck

  8. yjobic commented on Dec 18, 2025

    @yjobic
    Author

    I updated my conda from conda-25.11.0 to conda-25.11.1, and it's working again. It seems that it has nothing to do with VScode or Python Environments extension. I also updated the python extension, prior to the update of conda, which changed nothing. Thus it seems that the solution was to update conda.

  9. vantienpham commented on Jan 20, 2026

    @vantienpham

    I updated my conda from conda-25.11.0 to conda-25.11.1, and it's working again. It seems that it has nothing to do with VScode or Python Environments extension. I also updated the python extension, prior to the update of conda, which changed nothing. Thus it seems that the solution was to update conda.

    Same here, updated from conda-25.11.0 to conda-25.11.1, and it works!

  10. added
    confirmation pendingThe issue needs to be confirmed through a maintainer reproducing the bug.
    and removed
    triage-neededNeeds assignment to the proper sub-team
    on Mar 13, 2026
  11. eleanorjboyd commented on Sep 23, 2026

    @eleanorjboyd
    Member

    🤖 Thanks for the additional confirmations. Two users reported that upgrading Conda from 25.11.0 to 25.11.1 resolved this, but the report that caused the issue to be reopened did not include a Conda version or a follow-up. Could someone still affected confirm this on the latest Python and Python Environments extensions with a current Conda release, and include the Python and Python Environments output logs plus the output from Python: Report Issue? Issues marked info-needed automatically close after 30 days without a reply.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area-environmentsFeatures relating to handling interpreter environmentsbugIssue identified by VS Code Team member as probable bugconfirmation pendingThe issue needs to be confirmed through a maintainer reproducing the bug.info-neededIssue requires more information from poster

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions