# Python error when running certbot-auto

**URL:** <https://community.letsencrypt.org/t/python-error-when-running-certbot-auto/88399>\
**Category:** Help\
**Created:** [March 11, 2019, 3:40pm UTC](https://community.letsencrypt.org/t/python-error-when-running-certbot-auto/88399 "2019-03-11T15:40:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![michael13](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/michael13/32/30482_2.png) [@michael13](https://community.letsencrypt.org/u/michael13)\
**Post date:** [March 11, 2019, 3:40pm UTC](https://community.letsencrypt.org/t/python-error-when-running-certbot-auto/88399/1 "2019-03-11T15:40:46Z")

</div>

Hello, I’m using a certificate on Ubuntu 12.04.5 LTS (GNU/Linux 3.2.0-126-virtual i686) (hosted on DigitalOcean) for about 2 years running the update script on a weekly basis just by executing “certbot-auto renew” in cron.

Last week my certificate was successfully renewed and (according to the logs) certbot-auto was updated from 0.31.0 to 0.32.0.

The Python version 2.7.3.

Now any attempt to run certbot-auto (with any command line parameter, including ‘–version’ or even without any parameters) causes the following output:

```
Creating virtual environment...
Installing Python packages...
/opt/eff.org/certbot/venv/bin/python: No module named pip. __main__ ; 'pip' is a package and cannot be directly executed
Traceback (most recent call last):
  File "/tmp/tmp.PAUco4aVto/pipstrap.py", line 177, in <module>
    sys.exit(main())
  File "/tmp/tmp.PAUco4aVto/pipstrap.py", line 149, in main
    pip_version = StrictVersion(check_output([python, '-m', 'pip', '--version'])
  File "/usr/lib/python2.7/subprocess.py", line 544, in check_output
    raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '['/opt/eff.org/certbot/venv/bin/python', '-m', 'pip', '--version']' returned non-zero exit status 1

```

May the old (2.7.3) python version be the cause of the issue? I found here that certbot-auto should work with even 2.6!

Thank you in advance!

---

<div class="post-metadata">

**Author:** ![mnordhoff](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/mnordhoff/32/22583_2.png) [@mnordhoff](https://community.letsencrypt.org/u/mnordhoff)\
**Post date:** [March 11, 2019, 3:44pm UTC](https://community.letsencrypt.org/t/python-error-when-running-certbot-auto/88399/2 "2019-03-11T15:44:24Z")

</div>

It's actually the old version of pip.

See this thread:

> [@PIP error with certbot-auto](https://community.letsencrypt.org/t/pip-error-with-certbot-auto/88200):
>
> H…

You can patch certbot-auto to work around it, but you should upgrade to a newer OS. Precise has been EOL for ages, unless you're paying Canonical for Extended Security Maintenance.

---

<div class="post-metadata">

**Author:** ![michael13](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/michael13/32/30482_2.png) [@michael13](https://community.letsencrypt.org/u/michael13)\
**Post date:** [March 12, 2019, 6:29am UTC](https://community.letsencrypt.org/t/python-error-when-running-certbot-auto/88399/3 "2019-03-12T06:29:24Z")

</div>

Thank you very much for the link! I downgraded to 0.31.0 version of certbot-auto and use --no-self-upgrade flag. It woks now. [Here’s the solution / Github](https://github.com/certbot/certbot/issues/6824#issuecomment-470440436).

---

<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:** [April 11, 2019, 6:29am UTC](https://community.letsencrypt.org/t/python-error-when-running-certbot-auto/88399/4 "2019-04-11T06:29:35Z")

</div>

Closed on April 11, 2019, 6:29am UTC

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