[Python] Is it possible to add an interpreter to VSCode's list?

Discussão em 'Python' iniciado por Stack, Março 13, 2025.

  1. Stack

    Stack Membro Participativo

    I switch between CPython and PyPy every so often, and while the former is always present in Python: Select Interpreter..., the latter never sticks and I have to input the path manually. I'd like to save it as a permanent option globally.

    VSCode's documentation says:


    The extension automatically looks for interpreters in the following locations, in no particular order:

    • Standard install paths such as /usr/local/bin, /usr/sbin, /sbin, c:\\python36, etc.
    • Virtual environments located [...]
    • Interpreters created by pyenv, Pipenv, and Poetry.
    • Virtual environments located [...]
    • Conda environments [...]
    • Interpreters installed in a .direnv folder for direnv under the workspace folder.
    ​

    I'm not sure what would constitute a "standard install path" for PyPy (though apparently Inkscape's Python is included?!). I've tried creating a virtual environment under python.venvPath with --system-site-packages, but it doesn't seem to be detected, even when others are.

    Continue reading...

Compartilhe esta Página