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.
Depending on the version of your system, python2 might be installed already. Check it with:
python --version
or
python2 --version
If its not, you might be able to install it with brew, check the full instructions here.
brew install python@2
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
If you want to install python2 from source, you can try your luck with the instructions here.