Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CentOS 6.7 + Python 2.7 errors on letsencrypt-auto run #1106

centminmod opened this issue Oct 24, 2015 · 7 comments

CentOS 6.7 + Python 2.7 errors on letsencrypt-auto run #1106

centminmod opened this issue Oct 24, 2015 · 7 comments


Copy link

@centminmod centminmod commented Oct 24, 2015

I know Python 2.6 isn't supported so need to use Python 2.7 which I installed beside CenTOS 6.7's default Python 2.6.6 at python2.7 and that previously worked with web root authentication at

however, it no longer works with CentOS 6.7 + python 2.7

i did the following for install by sed replacing virtualenv with python2.7

cd /root/tools
git clone
cd letsencrypt
sed -i "s|--python python2|--python python2.7|" letsencrypt-auto
./letsencrypt-auto --verbose

./letsencrypt-auto --verbose
Updating letsencrypt and virtual environment dependencies...
Requirement already up-to-date: setuptools in /root/.local/share/letsencrypt/lib/python2.6/site-packages
/root/.local/share/letsencrypt/lib/python2.6/site-packages/pip/_vendor/requests/packages/urllib3/util/ InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL     appropriately and may cause certain SSL connections to fail. For more information, see
Requirement already up-to-date: pip in /root/.local/share/letsencrypt/lib/python2.6/site-packages
Collecting letsencrypt
  Using cached letsencrypt-0.0.0.dev20151021-py2-none-any.whl
Collecting letsencrypt-apache
  Using cached letsencrypt_apache-0.0.0.dev20151021-py2-none-any.whl
Collecting zope.interface (from letsencrypt)
  Using cached zope.interface-4.1.3.tar.gz
Requirement already up-to-date: setuptools in /root/.local/share/letsencrypt/lib/python2.6/site-packages (from letsencrypt)
Collecting python2-pythondialog>=3.2.2rc1 (from letsencrypt)
  Using cached python2-pythondialog-3.3.0.tar.bz2
Collecting PyOpenSSL (from letsencrypt)
  Using cached pyOpenSSL-0.15.1-py2.py3-none-any.whl
Collecting requests (from letsencrypt)
  Using cached requests-2.8.1-py2.py3-none-any.whl
Collecting pyrfc3339 (from letsencrypt)
  Using cached pyRFC3339-0.2.tar.gz
Collecting acme==0.0.0.dev20151021 (from letsencrypt)
  Using cached acme-0.0.0.dev20151021-py2-none-any.whl
Collecting configobj (from letsencrypt)
  Using cached configobj-5.0.6.tar.gz
Collecting pytz (from letsencrypt)
  Using cached pytz-2015.6-py2.py3-none-any.whl
Collecting psutil>=2.1.0 (from letsencrypt)
  Using cached psutil-3.2.2.tar.gz
Collecting six (from letsencrypt)
  Using cached six-1.10.0-py2.py3-none-any.whl
Collecting cryptography>=0.7 (from letsencrypt)
  Using cached cryptography-1.0.2.tar.gz
Collecting zope.component (from letsencrypt)
  Using cached zope.component-4.2.2.tar.gz
Collecting mock (from letsencrypt)
  Using cached mock-1.3.0-py2.py3-none-any.whl
Collecting ConfigArgParse (from letsencrypt)
  Using cached ConfigArgParse-0.9.3.tar.gz
    Complete output from command python egg_info:
    Traceback (most recent call last):
      File "<string>", line 20, in <module>
      File "/tmp/pip-build-mdwUEl/ConfigArgParse/", line 1, in <module>
        import configargparse
      File "", line 16
        ACTION_TYPES_THAT_DONT_NEED_A_VALUE = {argparse._StoreTrueAction,
    SyntaxError: invalid syntax

Command "python egg_info" failed with error code 1 in /tmp/pip-build-mdwUEl/ConfigArgParse

maybe it should be python2.7 instead ?

Command "python2.7 egg_info" failed with error code 1 in /tmp/pip-build-mdwUEl/ConfigArgParse

pip paths

locate bin/pip
Copy link

@centminmod centminmod commented Oct 24, 2015

ah seems i had to wipe the directory too /root/.local/share

cd /root/tools
rm -rf /root/tools/letsencrypt
rm -rf /etc/letsencrypt
rm -rf /var/lib/letsencrypt
rm -rf /root/.local/share
git clone
cd letsencrypt
sed -i "s|--python python2|--python python2.7|" letsencrypt-auto
./letsencrypt-auto --verbose

you can probably check for python binary's version if you detect centos/rhel i.e. if centos 6, then check for /usr/bin/python2 = 2.6.6 or /usr/bin/python2.7 = 2.7.10 installed via IUS Community yum repo and assign the appropriate python or python2.7 for virtualenv creation

guess similar thing can be done for other OSes #1078

or maybe add to letsencrypt-auto --pythonpath= flag so end user can pass the path to python 2.7 binary themselves

Copy link

@centminmod centminmod commented Oct 24, 2015

another user hit with this problem with centos 6.x and python 2.6 defaults

IUS Community yum repo can install python 2.7 beside centos 6.x's python 2.6

yum -y install python27 python27-devel python27-pip python27-setuptools python27-tools python27-virtualenv --enablerepo=ius

edit: looks like they moved to

Copy link

@sashkab sashkab commented Oct 27, 2015

I'd suggest using Software Collections by Redhat in order to install Python 2.7. Page, I linked to has all instructions required for the running python 2.7 on centos 6.x.

Few tweaks will be required to properly support SCL on CenOS 6...

Copy link

@kuba kuba commented Oct 31, 2015

The project supports 2.6. #1257 should fix remaining issues. If it doesn't then please attach fixes based on the contents of that PR.

Copy link

@bmw bmw commented Nov 6, 2015

Since #1257 has landed (as part of #1361), I believe this has been resolved. It has not been pushed to PyPI yet (coming soon), so you will only see the changes if you're building from master. If the recent changes do not fix the problem, please comment and I'll reopen.

@bmw bmw closed this Nov 6, 2015
Copy link

@rromanchuk rromanchuk commented Dec 4, 2015

hmm, just got stuck on this for a while because what i think may have been from a previous install. It would immediately fail when running with error while loading shared libraries: even though 2.6 was no where to be found on my system. After rm -rf /root/.local/share/letsencrypting everything worked as expected. Probably super edge case, or legacy beta cruft, but it would be helpful if there was some way an end user can confidently force a reinstall without having to know internal details.

Copy link

@bertramn bertramn commented Jan 21, 2016

Below worked for me on RHEL 6 based clone

enable software collections

Centos e.g. yum install centos-release-SCL
or Oracle Linux

install python 2.7 and scl utils

sudo yum update
sudo yum install scl-utils python27 python27-scldevel

enable python 2.7 for bash

scl enable python27 bash

happy crypting

letsencrypt-auto --verbose

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
6 participants