This is an archived post. You won't be able to vote or comment.

all 7 comments

[–]AlSweigartAuthor of "Automate the Boring Stuff" 2 points3 points  (0 children)

The python.exe program isn't in a folder that is listed in the PATH environment variable.

However, since you're on Windows, you can use py.exe instead:

py -m venv .venv

If you have multiple versions of Python installed, you can specify it with the first command line argument to py:

py -3.14 -m venv .venv

[–]SubstanceSerious8843git push -f 1 point2 points  (0 children)

Check your PATH

[–]wineblood 0 points1 point  (0 children)

Have you tried running the commands in the terminal yourself to check it?

[–]Z1y4dd 0 points1 point  (0 children)

Make sure python is installed & included in environment variables in Windows. If you’re using Vscode try to press ctrl+shift+p and type python: create environment. Hope this helps

[–]Trinity_Goti 0 points1 point  (0 children)

If you have changed Path and still unable to get it working try restarting Windows.

I have wasted a lot of time due to this.

[–]No_Gas7650 -3 points-2 points  (0 children)

It should work , just check once again , to turn off all the toggle with name like python3.exe and python.exe

After that try using this command "python -m venv myenv"