Let’s Encrypt will soon no longer support Python 2.6 due to its security update and the depreciate error prompted when running letsencrypt-auto script. Here is how to install Python 2.7 in CentOS 6 (can be done on CentOS 7 too) and enable Let’s Encrypt to use Python 2.7 environment. Install Python 2.7 in Centos Grab latest Python 2.7 from https://www.python.org/ftp/python, when we write this tutorial, it’s version 2.7.9, it could be different version when you found this tutorial. We will do a wget for 2.7.9 python installation files.
# wget https://www.python.org/ftp/python/2.7.9/Python-2.7.9.tar.xz
# xz -d Python-2.7.9.tar.xz # tar -xvf Python-2.7.9.tar
# cd Python-2.7.9 # ./configure --prefix=/usr/local # make # make altinstall
# cd /usr/local/bin # ls python2* python2.7 python2.7-config
# mv /root/.local /root/.oldlocal
# cd /opt/letsencrypt # ./letsencrypt-auto renew Bootstrapping dependencies for RedHat-based OSes... yum is /usr/bin/yum Loaded plugins: fastestmirror, replace Setting up Install Process Loading mirror speeds from cached hostfile * base: kodeterbuka.beritagar.id * epel: epel.mirror.angkasa.id * extras: centos.mirror.angkasa.id * rpmforge: mirror.smartmedia.net.id * updates: centos.mirror.angkasa.id * webtatic: us-east.repo.webtatic.com Package gcc-4.4.7-17.el6.x86_64 already installed and latest version Package dialog-1.1-9.20080819.1.el6.x86_64 already installed and latest version Package augeas-libs-1.0.0-10.el6.x86_64 already installed and latest version Package openssl-1.0.1e-48.el6_8.3.x86_64 already installed and latest version Package openssl-devel-1.0.1e-48.el6_8.3.x86_64 already installed and latest version Package libffi-devel-3.0.5-3.2.el6.x86_64 already installed and latest version Package redhat-rpm-config-9.0.3-51.el6.centos.noarch already installed and latest version Package ca-certificates-2015.2.6-65.0.1.el6_7.noarch already installed and latest version Package python-2.6.6-66.el6_8.x86_64 already installed and latest version Package python-devel-2.6.6-66.el6_8.x86_64 already installed and latest version Package python-virtualenv-1.10.1-1.el6.noarch already installed and latest version Package python-tools-2.6.6-66.el6_8.x86_64 already installed and latest version Package python-pip-7.1.0-1.el6.noarch already installed and latest version Package 1:mod_ssl-2.2.15-54.el6.centos.x86_64 already installed and latest version Nothing to do Creating virtual environment... Installing Python packages...
# cd /root/.local/share/letsencrypt/lib/ # ls python2.7
./letsencrypt-auto renew /root/.local/share/letsencrypt/lib/python2.6/site-packages/cryptography/__init__.py:26: DeprecationWarning: Python 2.6 is no longer supported by the Python core team, please upgrade your Python. A future version of cryptography will drop support for Python 2.6 DeprecationWarning