python 3.x – python3 is not recognized as an internal or external command, operable program or batch file

python 3.x – python3 is not recognized as an internal or external command, operable program or batch file

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

You can also try this:
Go to the path where Python is installed in your system. For me it was something like C:Users\Local SettingsApplication DataProgramsPythonPython37
In this folder, youll find a python executable. Just create a duplicate and rename it to python3. Works every time.

enter

python 3.x – python3 is not recognized as an internal or external command, operable program or batch file

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_PYTHONpython.exe environment

Python2

virtualenv –python=C:PATH_TO_PYTHONpython.exe environment

then activate the environment using

.environmentScriptsactivate.ps1

Leave a Reply

Your email address will not be published. Required fields are marked *