Python Forum

Full Version: what does "python3" mean
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
when i see python stuff on places like github i see "python3 -m" a lot and when i try and use it in command prompt i get "'python3' is not recognized as an internal or external command,operable program or batch file." and when i use python 3.6.4 (my perferred version of python) i get a "NameError: name 'python3' is not defined".
any help would be very much appreciated.
python3 is by default just python on many installations.
there installations distinguish between 2.7 and 3.whatever using python and python3, and also pip and pip3

The release of python 3.0 was a major one, thus the reason for the split.

Since you are seeing:
Quote:"NameError: name 'python3' is not defined".
I suspect your 'python' is python3. to verify this, please issue the following command from a command shell:
python -V
You should see something similar to:
Output:
Python 3.7.2
if not try same for python3

Also, you may want to upgrade to version 3.7.2 as there have been many improvements.
i realised it was simply "python" for my version and not python3
A lot of times windows will just have the executable titled as python.exe with no 3 even if it is 3 but the directory it is in will be labeled as 3 etc. But linux and mac have different directory structures and their binaries are labeled as python for python2.x and python3 for python3.x (of course now that 2.x is almost dead that is changing for some distros). So now you will see both python and python3 refer to python3.x.