Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

python3 -m venv invalid syntax

I'm trying to run this specific line, but I am getting an error. I am using the command prompt and I installed python to path when I check the install to path option on the windows python.exe

>>> python3 -m venv tutorial-env
   File "<stdin>", line 1
     python3 -m venv tutorial-env
                   ^
SyntaxError: invalid syntax
like image 877
B Hok Avatar asked Oct 20 '25 17:10

B Hok


1 Answers

That command should be run from your OS-level shell, not from Python:

$ python3 -m venv tutorial-env

or on Windows:

C:\> python3 -m venv tutorial-env

Depending on how Python was installed you might need to use python or even python2 instead of python3.

like image 157
Chris Avatar answered Oct 22 '25 05:10

Chris



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!