What Causes the “python3: command not found” Error?
First, what exactly causes this error?
On Linux and macOS, the default Python runtime is usually version 2.x. So, the python
command runs Python 2 while python3
explicitly runs Python 3. However, recent distributions are slowly discarding python2 in favor of python3 while retaining the python3 command.
But, there is no “python3” command on Windows. The Python executable is called python regardless of 2.x or 3.x.
So when installing a Python 3 package on Windows, referencing python3
causes the “command not found” error.
Let’s walk through a real example to solidify this:
|