'python3' is not recognized as an internal

2019-01-13 16:00发布

I am using python 3.5.2 version in windows 7 and tried using python3 app.py. I am getting this error message

'python3' is not recognized as an internal or external command,
operable program or batch file. 

any specific cause about why python3 command is not working? I also verified that the PATH is added to environment variables.

4条回答
等我变得足够好
2楼-- · 2019-01-13 16:17

For Python 27

virtualenv -p C:\Python27\python.exe django_concurrent_env

For Pyton36

 virtualenv -p C:\Python36\python.exe django_concurrent_env
查看更多
Summer. ? 凉城
3楼-- · 2019-01-13 16:26

There is no python3.exe file, that is why it fails.

Try:

py

instead.

py is just a launcher for python.exe. If you have more than one python versions installed on your machine (2.x, 3.x) you can specify what version of python to launch by

py -2 or py -3

查看更多
虎瘦雄心在
4楼-- · 2019-01-13 16:26

If python2 is not installed on your computer, you can try with just python instead of python3

查看更多
叼着烟拽天下
5楼-- · 2019-01-13 16:39

Python3.exe is not defined in windows

Specify the path for required version of python when you need to used it by creating virtual environment for your project

Python 3

virtualenv --python=C:\PATH_TO_PYTHON\python.exe environment

Python2

virtualenv --python=C:\PATH_TO_PYTHON\python.exe environment

then activate the environment using

.\environment\Scripts\activate.ps1

查看更多
登录 后发表回答