# Syntaxerror in certbot-auto

**URL:** <https://community.letsencrypt.org/t/syntaxerror-in-certbot-auto/100571>\
**Category:** Help\
**Created:** [August 24, 2019, 2:30pm UTC](https://community.letsencrypt.org/t/syntaxerror-in-certbot-auto/100571 "2019-08-24T14:30:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![blackshadow](https://avatars.discourse-cdn.com/v4/letter/b/67e7ee/32.png) [@blackshadow](https://community.letsencrypt.org/u/blackshadow)\
**Post date:** [August 24, 2019, 2:30pm UTC](https://community.letsencrypt.org/t/syntaxerror-in-certbot-auto/100571/1 "2019-08-24T14:30:37Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![ferdiS](https://avatars.discourse-cdn.com/v4/letter/f/df705f/32.png) [@ferdiS](https://community.letsencrypt.org/u/ferdiS)\
**Post date:** [August 25, 2019, 10:16am UTC](https://community.letsencrypt.org/t/syntaxerror-in-certbot-auto/100571/2 "2019-08-25T10:16:16Z")

</div>

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](https://stackoverflow.com/questions/51646558/unable-to-install-python-packages-using-pip-in-ubuntu-linux-insecureplatformwar/54582701#54582701)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/letsencrypt/original/3X/c/a/ca6c06ea1ea201324bba7048c6841ce60236468d.png) [@system](https://community.letsencrypt.org/u/system)\
**Post date:** [September 24, 2019, 10:16am UTC](https://community.letsencrypt.org/t/syntaxerror-in-certbot-auto/100571/3 "2019-09-24T10:16:16Z")

</div>

Closed on September 24, 2019, 10:16am UTC

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