Skip to content

Latest commit

 

History

History
62 lines (42 loc) · 1.25 KB

PYTHON2.md

File metadata and controls

62 lines (42 loc) · 1.25 KB

Python 2.7.18 installation tips and tricks


Python2 has reached its end-of-life in 2020 but some software, such as HADDOCK still requires it. Here are some tips on how to install it.

MacOs

out-of-the-box

Depending on the version of your system, python2 might be installed already. Check it with:

python --version

or

python2 --version

Homebrew

If its not, you might be able to install it with brew, check the full instructions here.

brew install python@2

Pyenv

If that also does not work you can use pyenv. After installing pyenv you need to install the python2.7.18 version;

pyenv install 2.7.18

And to activate/use this version you need to add the following to your haddock24.sh script:

export PYENV_ROOT="$HOME/.pyenv"
command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
pyenv shell 2.7.18

# $ python --version
# Python 2.7.18

From source

If you want to install python2 from source, you can try your luck with the instructions here.