How to setup virtual environment for Python in VS Code?

后端 未结 12 1927
灰色年华
灰色年华 2020-11-29 16:29

In my project folder I created venv folder.

python -m venv venv

When I in VS Code run command select python interpreter my ven

12条回答
  •  夕颜
    夕颜 (楼主)
    2020-11-29 16:42

    I had the same problem and the solution was pretty easy:

    "If you create a new conda environment while VS Code is running, use the Reload Window command to refresh the environment list shown with Python: Select Interpreter; otherwise you may not see the environment there. It might take a short time to appear; if you don't see it at first, wait 15 seconds then try using the command again."

    That's written on Vscode site

    Note: to Reload Window: ctrl+shift+p in Vscode, then write reload window

提交回复
热议问题