git clone [email protected]:pyenv/pyenv.git ~/.pyenv
cd ~/.pyenv && src/configure && make -C src
git clone [email protected]:pyenv/pyenv-update.git ~/.pyenv/plugins/pyenv-update
git clone [email protected]:pyenv/pyenv-virtualenv.git ~/.pyenv/plugins/pyenv-virtualenv
cd ~/.pyenv/plugins/python-build
PREFIX=$HOME/.local ./install.sh
export MAKE_OPTS=-j"$(getconf _NPROCESSORS_ONLN)"
python-build $v $(pyenv root)/versions/3.9.5/
Example of script to print install instructions for multiple Python versions:
for v in pypy3.7-7.3.4 3.10.0b1 3.9.5 3.8.10 3.7.10; do
echo MAKE_OPTS=-j"$(getconf _NPROCESSORS_ONLN)" \
python-build $v $(pyenv root)/versions/$v/
done
This will print lines like this:
MAKE_OPTS=-j8 python-build 3.9.5 /Users/serghei/.pyenv/versions/3.9.5/
for v in pypy3.7-7.3.4 3.10.0b1 3.9.5 3.8.10 3.7.10; do
pyenv local $v
pyenv rehash
pip install -U pip setuptools wheel tox
done