It’s not quite that simple.
The pyenv install
step doesn’t work because:
WARNING: seems you still have not added 'pyenv' to the load path.
# Load pyenv automatically by adding
# the following to ~/.bashrc:
export PATH="/root/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
However, after doing that the pyenv install 3.4.2
command completes with warnings:
WARNING: The Python bz2 extension was not compiled. Missing the bzip2 lib?
WARNING: The Python readline extension was not compiled. Missing the GNU readline lib?
WARNING: The Python sqlite3 extension was not compiled. Missing the SQLite3 lib?
and the certbot install fails with:
RuntimeError: cryptography requires setuptools 18.5 or newer, please upgrade to a newer version of setuptools
So, you may need:
PYENV_VERSION=3.4.2 pip install setuptools --upgrade
Also, when I run certbot
now, I get a warning:
CryptographyDeprecationWarning: OpenSSL version 1.0.1 is no longer supported by the OpenSSL project, please upgrade. A future version of cryptography will drop support for it.
Otherwise, I really like this solution!
ETA: running certbot renew
tells me:
Could not choose appropriate plugin for updaters: Could not select or initialize the requested installer apache.
So, also needs:
PYENV_VERSION=3.4.2 pip install certbot-apache
or whatever other plugins you need.