1

I have been trying to create a virtual environment for django project but I have been meeting the error below.

py : The term 'py' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1

  • py --version
  • ~~
    • CategoryInfo : ObjectNotFound: (py:String) [], CommandNotFoundException
    • FullyQualifiedErrorId : CommandNotFoundException

Attached is also the graphic of the error as it appears on my system.

I have added python to path in environmental variables yet it's not working.

3
  • shouldn't you be calling python instead of py? Commented Mar 21, 2023 at 10:55
  • 1
    Use python or python3 instead of py. Commented Mar 21, 2023 at 10:59
  • Ok, I'll try the python command. Thank you @SembeiNorimaki Commented Mar 22, 2023 at 7:42

2 Answers 2

2

Unless you have aliased the command to be py, the command is python or python3.

py is just the file extension

Sign up to request clarification or add additional context in comments.

Comments

0

create the alias

doskey py = python 

otherwise run

python -m venv .venv8 

instead of py -3 -m venv .venv to create your environment

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.