- If Python is already available on your system it is likely to
be
Python 2
. You can check your version as:
python --version
- If both
Python 2
andPython 3
are already installed, you might need to explicitly callpython3
instead ofpython
. Then, to check yourPython 3
version:
python3 --version
If Python 3.7
is already installed on your system, you can
skip these instructions.
On OSX, Python3.7
can be installed with homebrew, as:
brew unlink python
brew install python
If not available from your local package manager, Python 3.7
can be installed
from the source.
- Get the source distribution from www.python.org and extract it locally. E.g. as:
wget https://www.python.org/ftp/python/3.7.2/Python-3.7.2.tgz
tar xzf Python-3.7.2.tgz
- Configure, build and install (requires .red[root] privileges), E.g. as:
cd Python-3.7.2
./configure
sudo make altinstall
You'll get a warning that your Python build is not optimized. You can ignore it for the present purpose.