# Certbot failing to find python version on Centos 6.10

**URL:** <https://community.letsencrypt.org/t/certbot-failing-to-find-python-version-on-centos-6-10/105634>\
**Category:** Help\
**Created:** [November 6, 2019, 12:49am UTC](https://community.letsencrypt.org/t/certbot-failing-to-find-python-version-on-centos-6-10/105634 "2019-11-06T00:49:36Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![iamcal](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/iamcal/32/35042_2.png) [@iamcal](https://community.letsencrypt.org/u/iamcal)\
**Post date:** [November 6, 2019, 12:49am UTC](https://community.letsencrypt.org/t/certbot-failing-to-find-python-version-on-centos-6-10/105634/1 "2019-11-06T00:49:36Z")

</div>

I’ve been using certbot on a Centos 6.10 box for a few years, and it started failing after a recent `yum update`. The versions of python I have installed are:

```
/usr/bin/python2.6
/usr/bin/python3.4

```

From reading the source it looks like certbot requires 2.7 or 3.5, neither of which come with Centos 6, so this looks like the OS is just no longer supported?

I ran this command: `./certbot-auto --apache renew`

It produced this output:

```
WARNING: couldn't find Python 3.5+ to check for updates.
Traceback (most recent call last):
  File "<stdin>", line 16, in <module>
  File "/usr/lib64/python3.4/distutils/version.py", line 58, in __lt__
    c = self._cmp(other)
  File "/usr/lib64/python3.4/distutils/version.py", line 176, in _cmp
    if self.version != other.version:
AttributeError: 'StrictVersion' object has no attribute 'version'

```

My web server is (include version): Apache/2.2.15

The operating system my web server runs on is (include version): Centos 6.10

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): unable to run that command

---

<div class="post-metadata">

**Author:** ![\_az](https://avatars.discourse-cdn.com/v4/letter/_/22d042/32.png) [@\_az](https://community.letsencrypt.org/u/_az)\
**Post date:** [November 6, 2019, 12:52am UTC](https://community.letsencrypt.org/t/certbot-failing-to-find-python-version-on-centos-6-10/105634/2 "2019-11-06T00:52:46Z")

</div>

Unfortunately the Certbot 0.40.0 release just now blew some stuff up for CentOS 6. I think it will be fixed soonish in 0.40.1? @bmw

---

<div class="post-metadata">

**Author:** ![bmw](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/bmw/32/7797_2.png) [@bmw](https://community.letsencrypt.org/u/bmw)\
**Post date:** [November 6, 2019, 1:10am UTC](https://community.letsencrypt.org/t/certbot-failing-to-find-python-version-on-centos-6-10/105634/3 "2019-11-06T01:10:22Z")

</div>

EDIT: Now that a fix has been released, you should be able to fix the problem by downloading and using a new version of the script at [https://dl.eff.org/certbot-auto](https://dl.eff.org/certbot-auto).

Yeah we’re actively working on a release to fix this issue. Even after the fix is released, users on RHEL 6 based systems affected by this will have to run a command like this manually as this problem is occurring while `certbot-auto` is trying to determine if it needs to upgrade itself.

To fix the issue, I recommend running `sudo rm -rf /opt/eff.org/` and running `certbot-auto` again.

This will delete the Certbot installation on disk which will cause `certbot-auto` to walk you through installing any needed dependencies like it’s a fresh installation. If you’re using version `0.40.0` (or a version we’ll likely release in a couple weeks after fixing this bug), certbot-auto will ask you to enable the [SCL](https://www.softwarecollections.org/en/) repository so a non-EOL’d version of Python can be installed.

---

<div class="post-metadata">

**Author:** ![iamcal](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/iamcal/32/35042_2.png) [@iamcal](https://community.letsencrypt.org/u/iamcal)\
**Post date:** [November 6, 2019, 1:28am UTC](https://community.letsencrypt.org/t/certbot-failing-to-find-python-version-on-centos-6-10/105634/4 "2019-11-06T01:28:23Z")

</div>

That worked perfectly - thank you!

---

<div class="post-metadata">

**Author:** ![salubrium](https://avatars.discourse-cdn.com/v4/letter/s/8c91f0/32.png) [@salubrium](https://community.letsencrypt.org/u/salubrium)\
**Post date:** [November 6, 2019, 5:39am UTC](https://community.letsencrypt.org/t/certbot-failing-to-find-python-version-on-centos-6-10/105634/5 "2019-11-06T05:39:14Z")

</div>

I’m getting a different error on Centos 6.10 (and it happens my renewal is due tomorrow)

certbot-auto renew  
/usr/local/bin/certbot-auto: line 507: .: scl\_source: file not found  
Bootstrapping dependencies for Legacy RedHat-based OSes that will use Python3… (you can skip this with --no-bootstrap)

yum is hashed (/usr/bin/yum)

4871 packages excluded due to repository priority protections  
Package matching gcc-4.4.7-23.el6.x86\_64 already installed. Checking for update.  
Package augeas-libs-1.0.0-10.el6.x86\_64 already installed and latest version  
Package openssl-1.0.1e-58.el6\_10.x86\_64 already installed and latest version  
Package openssl-devel-1.0.1e-58.el6\_10.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-2018.2.22-65.1.el6.noarch already installed and latest version  
Package rh-python36-python-3.6.3-4.el6.x86\_64 already installed and latest version  
Package rh-python36-python-virtualenv-15.1.0-2.el6.noarch already installed and latest version  
Package rh-python36-python-devel-3.6.3-4.el6.x86\_64 already installed and latest version  
Package 1:mod\_ssl-2.2.15-69.el6.centos.x86\_64 already installed and latest version  
Nothing to do  
/usr/local/bin/certbot-auto: line 507: .: scl\_source: file not found  
WARNING: couldn’t find Python 3.5+ to check for updates.  
Traceback (most recent call last):  
File “”, line 16, in   
File “/usr/lib64/python3.4/distutils/version.py”, line 58, in **lt**  
c = self.\_cmp(other)  
File “/usr/lib64/python3.4/distutils/version.py”, line 176, in \_cmp  
if self.version != other.version:  
AttributeError: ‘StrictVersion’ object has no attribute ‘version’

---

<div class="post-metadata">

**Author:** ![bmw](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/bmw/32/7797_2.png) [@bmw](https://community.letsencrypt.org/u/bmw)\
**Post date:** [November 6, 2019, 5:57am UTC](https://community.letsencrypt.org/t/certbot-failing-to-find-python-version-on-centos-6-10/105634/6 "2019-11-06T05:57:25Z")

</div>

What is the output of `(. scl_source enable rh-python36; python3 --version)`?

It looks like `certbot-auto` is failing to run `. scl_source enable rh-python36` and the script should work if you can fix that problem.

---

<div class="post-metadata">

**Author:** ![salubrium](https://avatars.discourse-cdn.com/v4/letter/s/8c91f0/32.png) [@salubrium](https://community.letsencrypt.org/u/salubrium)\
**Post date:** [November 6, 2019, 9:50pm UTC](https://community.letsencrypt.org/t/certbot-failing-to-find-python-version-on-centos-6-10/105634/7 "2019-11-06T21:50:00Z")

</div>

Thanks for the quick response, the issue was that I’m using EPEL repo with a higher priority. It’s got a slightly more outdated version of scl-utils that doesn’t contain scl\_source:

[https://pkgs.org/download/scl-utils-build](https://pkgs.org/download/scl-utils-build)  
CentOS x86\_64  
[scl-utils-build-20120927-29.el6\_9.x86\_64.rpm]

EPEL x86\_64  
[scl-utils-build-20120229-1.el6.x86\_64.rpm]

Upgrading from default CentOS repo solved the issue.

---

<div class="post-metadata">

**Author:** ![bmw](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/bmw/32/7797_2.png) [@bmw](https://community.letsencrypt.org/u/bmw)\
**Post date:** [November 7, 2019, 12:06am UTC](https://community.letsencrypt.org/t/certbot-failing-to-find-python-version-on-centos-6-10/105634/8 "2019-11-07T00:06:22Z")

</div>

Thanks for following up with that explanation @salubrium. I wasn’t aware there are packaged versions which do not contain `scl_source`. I opened an issue for us to look into making certbot-auto automatically work in this case at [https://github.com/certbot/certbot/issues/7524](https://github.com/certbot/certbot/issues/7524).

---

<div class="post-metadata">

**Author:** ![daTourist](https://avatars.discourse-cdn.com/v4/letter/d/8797f3/32.png) [@daTourist](https://community.letsencrypt.org/u/daTourist)\
**Post date:** [November 8, 2019, 9:21am UTC](https://community.letsencrypt.org/t/certbot-failing-to-find-python-version-on-centos-6-10/105634/9 "2019-11-08T09:21:45Z")

</div>

Thanks for the pointer!

Had the same issue with “certbot-auto: line 507: .: scl\_source: file not found” and solved it by updating scl-utils-\* while excluding the EPEL repo:

```
yum --disablerepo=epel update scl-utils-*
```

---

<div class="post-metadata">

**Author:** ![felixpenrose](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/felixpenrose/32/35234_2.png) [@felixpenrose](https://community.letsencrypt.org/u/felixpenrose)\
**Post date:** [November 13, 2019, 9:19am UTC](https://community.letsencrypt.org/t/certbot-failing-to-find-python-version-on-centos-6-10/105634/10 "2019-11-13T09:19:20Z")

</div>

Fixed my issue on centos 6.10 many thanks

---

<div class="post-metadata">

**Author:** ![mroz123](https://avatars.discourse-cdn.com/v4/letter/m/838e76/32.png) [@mroz123](https://community.letsencrypt.org/u/mroz123)\
**Post date:** [November 18, 2019, 1:30am UTC](https://community.letsencrypt.org/t/certbot-failing-to-find-python-version-on-centos-6-10/105634/11 "2019-11-18T01:30:34Z")

</div>

Hello, is there any way to run certbot-auto on 32bit CentOS 6.10? SCL is available only for 64 bit OS as far as I can tell. I can install Python 3.5 without any problem so is there any reason it needs a python from SCL specificaly?

---

<div class="post-metadata">

**Author:** ![gstephan](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/gstephan/32/35379_2.png) [@gstephan](https://community.letsencrypt.org/u/gstephan)\
**Post date:** [November 18, 2019, 2:47pm UTC](https://community.letsencrypt.org/t/certbot-failing-to-find-python-version-on-centos-6-10/105634/12 "2019-11-18T14:47:22Z")

</div>

What i did on my side:

install python34

edit /usr/bin/certbot-auto and replaced “3.5” with “3.4” in the min python 3 release needed, it fixed the issue. Until next update i guess 🙂

---

<div class="post-metadata">

**Author:** ![bta](https://avatars.discourse-cdn.com/v4/letter/b/f6c823/32.png) [@bta](https://community.letsencrypt.org/u/bta)\
**Post date:** [November 18, 2019, 3:44pm UTC](https://community.letsencrypt.org/t/certbot-failing-to-find-python-version-on-centos-6-10/105634/13 "2019-11-18T15:44:51Z")

</div>

So is there an accepted fix or permanent workaround yet? I followed the steps in post #3 but the error keeps happening.

---

<div class="post-metadata">

**Author:** ![mroz123](https://avatars.discourse-cdn.com/v4/letter/m/838e76/32.png) [@mroz123](https://community.letsencrypt.org/u/mroz123)\
**Post date:** [November 18, 2019, 6:45pm UTC](https://community.letsencrypt.org/t/certbot-failing-to-find-python-version-on-centos-6-10/105634/14 "2019-11-18T18:45:02Z")

</div>

I ended up downloading previous version from

> [https://github.com/certbot/certbot/blob/v0.35.0/certbot-auto](https://github.com/certbot/certbot/blob/v0.35.0/certbot-auto)

and using it with no upgrade parameter

> certbot-auto --no-self-upgrade renew

---

<div class="post-metadata">

**Author:** ![bmw](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/bmw/32/7797_2.png) [@bmw](https://community.letsencrypt.org/u/bmw)\
**Post date:** [November 20, 2019, 12:38am UTC](https://community.letsencrypt.org/t/certbot-failing-to-find-python-version-on-centos-6-10/105634/15 "2019-11-20T00:38:38Z")

</div>

@mroz123, thanks for flagging this for us.

For now, you can safely use the latest version of `certbot-auto` and I'd recommend doing so if you're not going to upgrade your OS, however, I think a version in the near future is going to have to drop support for 32 bit CentOS 6. Too many of our dependencies are dropping support for the software available on that platform. You could try to install newer versions of Python and [OpenSSL](https://github.com/certbot/certbot/issues/7184) if you wanted but that's not entirely trivial.

We haven't decided what exactly certbot-auto's behavior will be on 32 bit CentOS 6 when support is dropped, but I expect it'll be similar to the behavior your currently getting with `--no-self-upgrade` where you will not get any new security/compatibility fixes to Certbot but the script continues to work for now probably with warning messages telling you about these problems.

> [@bta](#):
>
> So is there an accepted fix or permanent workaround yet? I followed the steps in post #3 but the error keeps happening.

Now that a fix has been released, you should be able to fix the problem by downloading and using a new version of the script at [https://dl.eff.org/certbot-auto](https://dl.eff.org/certbot-auto).

If that doesn't work for you, please let us know!

---

<div class="post-metadata">

**Author:** ![ztank](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/ztank/32/35838_2.png) [@ztank](https://community.letsencrypt.org/u/ztank)\
**Post date:** [December 8, 2019, 9:51am UTC](https://community.letsencrypt.org/t/certbot-failing-to-find-python-version-on-centos-6-10/105634/16 "2019-12-08T09:51:21Z")

</div>

Worked like a charm. Thanks a lot.

---

<div class="post-metadata">

**Author:** ![FabGilette](https://avatars.discourse-cdn.com/v4/letter/f/439d5e/32.png) [@FabGilette](https://community.letsencrypt.org/u/FabGilette)\
**Post date:** [December 9, 2019, 3:56pm UTC](https://community.letsencrypt.org/t/certbot-failing-to-find-python-version-on-centos-6-10/105634/17 "2019-12-09T15:56:30Z")

</div>

Thanks for the edit !  
On CentOS 6.8, I had the very exact same message than on the first post (CentOS 6.10). Thanks so much for those automated warning emails from letsencrypt about the expiration date getting too close. I was about 9 days from a big big problem 🙂 and would not have been aware (thing is, I hate updates on something that works !)  
So all I had to do was these three steps :

1. yum install centos-release-scl
2. sudo rm -rf /opt/eff.org/
3. ./certbot-auto renew

---

<div class="post-metadata">

**Author:** ![nbatteur](https://avatars.discourse-cdn.com/v4/letter/n/7ea924/32.png) [@nbatteur](https://community.letsencrypt.org/u/nbatteur)\
**Post date:** [December 26, 2019, 9:04am UTC](https://community.letsencrypt.org/t/certbot-failing-to-find-python-version-on-centos-6-10/105634/18 "2019-12-26T09:04:56Z")

</div>

Works like a charm. Thank you.

---

<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:** [January 25, 2020, 9:05am UTC](https://community.letsencrypt.org/t/certbot-failing-to-find-python-version-on-centos-6-10/105634/19 "2020-01-25T09:05:00Z")

</div>

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