简体   繁体   中英

Virtual environment is not recognized as an internal or external command in vscode

I am trying to run code on vscode and I have a folder, workplse, and a file inside it called please.py, i coded in vscode to make a virtual environment called venv, but when I try to activate it I am given
'venv' is not recognized as an internal or external command, operable program or batch file. Here is my folder错误图片

The command and error code is here: 事物

It should be an absolute path while not a relative path, such as:

c:/Work/python3.10/.venv/Scripts/activate.bat

And you needn't activate the virtual environment manually, through the shortcut of Ctrl+Shift+` to create a new terminal, the Python extension will activate the python environment which you have selected automatically.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM