Syntaxerror in certbot-auto

My domain is:
Not required as this is about a syntax error in certbot-auto

I ran this command:
certbot-auto renew

It produced this output:
/opt/eff.org/certbot/venv/bin/python: No module named pip.main; ‘pip’ is a package and cannot be directly executed

My web server is (include version):
Irrelevant for this error

The operating system my web server runs on is (include version):
Ubuntu 12.04 LTS (Not upgradable for compatibility reasons to proprietary software that is not updated anymore)

My hosting provider, if applicable, is:
not applicable

I can login to a root shell on my machine (yes or no, or I don’t know):
yes

I’m using a control panel to manage my site (no, or provide the name and version of the control panel):
no

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you’re using Certbot):
certbot 0.37.2

Details:
The problem is that since I think half a year certbot-auto has changed something, which is not supported at my system. Thus I always have to change the script after update. So everytime my certificate runs out, I have to change certbot-auto to make it work.

I’ve to replace the following lines, that it starts working again:
pip_version = StrictVersion(check_output([python, '-m', 'pip', '--version'])
by
pip_version = StrictVersion(check_output(['pip', '--version'])

and command = [python, '-m', 'pip', 'install', '--no-index', '--no-deps', '-U']
by
command = ['pip', 'install', '--no-index', '--no-deps', '-U']

Could you please provide some backward compatibility?

This will most likely be a problem because of the python version on your OS being very outdated. You could try to solve this by manually upgrading Python to the newest versions. A detailed explanation how to do this can be found on Stackoverflow: https://stackoverflow.com/questions/51646558/unable-to-install-python-packages-using-pip-in-ubuntu-linux-insecureplatformwar/54582701#54582701

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.