CentOS 6.7 runs Python2.6.6 installed Python2.7.6 how to call during letsencrypt-auto?

Greetings, first post.

CentOS v6.7 comes with Python 2.6.6 and hence when i try and run with -auto command it spits out some errors that im using an old version of Python and that i should upgrade to v 2.7 however i have been told by my hosting company that they already installed Python2.7.6 and i can confirm its installed with the command line \Python2.7

However when i run the letsencrypt command line to setup with auto command it still says im using Python old version.

The host has said that they do not recommend to override Python entirely on the server as it may cause other Cpanel or WHM script issues running.

So i guess my question is, is there a way via the Letsencrypt command line to specify the path of which Python to run, this way i can specify the 2.7 path and it should not complain anymore ???

Thats what im thinking anyway.

The reason i want to get this working properly is because i also want to use the --apache command line so i can automate everything, at the moment i need to manually run the following command every 90 days and i do not see it as a viable thing to do with several domains.

./letsencrypt-auto certonly --server https://acme-v01.api.letsencrypt.org/directory --debug

Any help would be most appreciated. The goal is to automate it via a cron job eventually.

Thanks.

this thread might help see Redhat / CentOS 6.x users need python 2.7

This is a bit over my head unfortunately… i tried what that thread said and said i dont have the package to install, after this im stuck… :expressionless: might have to put a job request on upwork to get this configured correctly :expressionless:

I haven't looked into this too closely, but the letsencrypt-auto command looks for a few different python binaries before using the system "python". See if you get output when you run "command -v python2.7".

Last I checked, that only worked for Debian using a very specific setup. Unless you need LE to update the host config, you should be fine using webroot and manually configuring the use of the certs the very first time. For renewals, letsencrypt-auto updates the symbolic links and the configuration should stay the same. You'd only need to reload the service to have it read the updated certificates on renewal.

On Centos 6.* IF you have installed Python 2.7 via source and then pip virtualenv, then when installing certbot, certbot will automatically install or update Python 2.6 via yum, and LATER realise that “oh, 2.7 exists, i’ll use that one”.

Can this dependency check be moved to before installing Python 2.6 via the yum list installed check, rather than after it’s installed and it’s time to “use” python?

@mitchmenkom - I had similar issue as you since the packagenames differ, try this one:

cd /root && wget http://python.org/ftp/python/2.7.6/Python-2.7.6.tar.xz && tar xf Python-2.7.6.tar.xz && cd Python-2.7.6 && ./configure --prefix=/usr/local --enable-unicode=ucs4 --enable-shared LDFLAGS="-Wl,-rpath /usr/local/lib" && make && make altinstall
^^ this whole step can be skipped if you’re sure you already have Python2.7 installed.

Then:
wget https://bootstrap.pypa.io/ez_setup.py -O - | python2.7
easy_install-2.7 pip
pip2.7 install virtualenv

however, --apache command line will not work, you’ll have to do cert generation with --webroot in style of:

certbot-auto certonly --webroot --expand --manual-public-ip-logging-ok --non-interactive --agree-tos --text -w /var/www/letsencrypt -d your.domain.tld

Cheers.