Skip to content

How to integrate with Visual Studio Code? #34

@victorwoo

Description

@victorwoo

In Windows 11, I opened the PowerShell terminal and entered some commands to create a local Python environment called env_name. I used the pyenv-win-venv commands like this:

pyenv-win-venv install 3.8.5 env_name
pyenv-win-venv activate env_name
pyenv-win-venv local env_name

Then, I opened Visual Studio Code. I pressed Ctrl + Shift + P to bring up the command palette and selected Python: Select Intepreter. But I didn't see the env_name interpreter in the list.

However, when I used pyenv-virtualenv commands instead:

pyenv local 3.12.7
pyenv shell 3.12.7
virtualenv -p3.12.7 env_name

Visual Studio Code could recognize this new environment. And in the Python: Select Intepreter option, there was a new entry Python 3.12.7 ('env_name': venv).\env_name\Scripts\python.exe. So, I'm wondering how to make pyenv-win-venv work properly with Visual Studio Code just like virtualenv does.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions