I want to set up a python3 virtual environment in my Workspace. I have two versions of python, installed in the following paths: C:\Python\Python27\python2.exe
C:\Python\Python38\python3.exe
. I already checked on the powershell terminal that they are properly installed.
I tried the command python3 -m venv .venv
. It created a .venv
folder, but I get the following error message: "Error: [Win Error2] The system cannot find the file specified
.
My IDE is Visual Studio Code 1.39.2
Also, Python3 is added to path in the Variable environment C:\Python\Python38
I also tried to use the command py -3 -m venv .venv
, but then I get:
Python 3 not found! Installed Pythons found by C:\WINDOWS\py.exe
launchers for Windows
No Installed Pythons found
I also already executed the command Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope Process
but nothing changed.
My settings.json file:
{ "python;pythonPath": "C:\\Python\\Python38\\python3.exe" }
My pyvenv.cfg file:
home = C:\Python\Python38
include-system-site-package = false
version = 3.8.0
py
command is what made it work. – Tenon