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

letsencrypt-auto doesn't work with Python 2.6 #1046

Closed
NoodlesNZ opened this Issue Oct 20, 2015 · 21 comments

Comments

Projects
None yet
@NoodlesNZ
Collaborator

NoodlesNZ commented Oct 20, 2015

When running letsencrypt-auto I get the following:

Creating virtual environment...
Updating letsencrypt and virtual environment dependencies...../root/.local/share/letsencrypt/lib/python2.6/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: 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 https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-TVlyY0/ConfigArgParse
/root/.local/share/letsencrypt/lib/python2.6/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: 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 https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning

I think this relates to the ConfigArgParse problem that @kuba was trying to fix.

@kuba

This comment has been minimized.

Show comment
Hide comment
@kuba

kuba Oct 20, 2015

Contributor

I seems to relate to ConfigArgParse, but not to the problem I was trying to solve. letsencrypt-auto gets stuff from PyPI only, including https://pypi.python.org/pypi/ConfigArgParse/0.9.3.

Could you look around /tmp/pip-build-TVlyY0 and pastebin relevant files?

Contributor

kuba commented Oct 20, 2015

I seems to relate to ConfigArgParse, but not to the problem I was trying to solve. letsencrypt-auto gets stuff from PyPI only, including https://pypi.python.org/pypi/ConfigArgParse/0.9.3.

Could you look around /tmp/pip-build-TVlyY0 and pastebin relevant files?

@NoodlesNZ

This comment has been minimized.

Show comment
Hide comment
@NoodlesNZ

NoodlesNZ Oct 20, 2015

Collaborator

I can't see that directory on my filesystem, I'm not familiar with virtualenv, is it hidden away somewhere else?

Collaborator

NoodlesNZ commented Oct 20, 2015

I can't see that directory on my filesystem, I'm not familiar with virtualenv, is it hidden away somewhere else?

@ChrisOrlando

This comment has been minimized.

Show comment
Hide comment
@ChrisOrlando

ChrisOrlando Oct 20, 2015

This is happening for me too. The /tmp/pip-build-XXXXX directory doesn't seem to exist afterward, so I can't send the contents.

ChrisOrlando commented Oct 20, 2015

This is happening for me too. The /tmp/pip-build-XXXXX directory doesn't seem to exist afterward, so I can't send the contents.

@dwyer

This comment has been minimized.

Show comment
Hide comment
@dwyer

dwyer Oct 20, 2015

I removed the > /dev/nulls so I can catch the error.

Collecting letsencrypt
  Using cached letsencrypt-0.0.0.dev20151020-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 /home/kc/.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 parsedatetime (from letsencrypt)
  Using cached parsedatetime-1.5-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 setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 20, in <module>
      File "/tmp/pip-build-C7iwhM/ConfigArgParse/setup.py", line 1, in <module>
        import configargparse
      File "configargparse.py", line 16
        ACTION_TYPES_THAT_DONT_NEED_A_VALUE = {argparse._StoreTrueAction,
                                                                        ^
    SyntaxError: invalid syntax

    ----------------------------------------

It appears that python2 is symlinked to python2.6 which doesn't support the set syntax.

My workaround:

rm -rf ~/.local/share/letsencrypt
sed -i 's/python2/python2.7/g' letsencrypt-auto
./letsencrypt-auto

dwyer commented Oct 20, 2015

I removed the > /dev/nulls so I can catch the error.

Collecting letsencrypt
  Using cached letsencrypt-0.0.0.dev20151020-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 /home/kc/.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 parsedatetime (from letsencrypt)
  Using cached parsedatetime-1.5-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 setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 20, in <module>
      File "/tmp/pip-build-C7iwhM/ConfigArgParse/setup.py", line 1, in <module>
        import configargparse
      File "configargparse.py", line 16
        ACTION_TYPES_THAT_DONT_NEED_A_VALUE = {argparse._StoreTrueAction,
                                                                        ^
    SyntaxError: invalid syntax

    ----------------------------------------

It appears that python2 is symlinked to python2.6 which doesn't support the set syntax.

My workaround:

rm -rf ~/.local/share/letsencrypt
sed -i 's/python2/python2.7/g' letsencrypt-auto
./letsencrypt-auto
@NoodlesNZ

This comment has been minimized.

Show comment
Hide comment
@NoodlesNZ

NoodlesNZ Oct 20, 2015

Collaborator

That seems to fix the letsencrypt-auto, but when trying to run letsencrypt I get this:

# /usr/bin/letsencrypt
Traceback (most recent call last):
  File "/usr/bin/letsencrypt", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 2655, in <module>
    working_set.require(__requires__)
  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 648, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 546, in resolve
    raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: ConfigArgParse
Collaborator

NoodlesNZ commented Oct 20, 2015

That seems to fix the letsencrypt-auto, but when trying to run letsencrypt I get this:

# /usr/bin/letsencrypt
Traceback (most recent call last):
  File "/usr/bin/letsencrypt", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 2655, in <module>
    working_set.require(__requires__)
  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 648, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 546, in resolve
    raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: ConfigArgParse
@kuba

This comment has been minimized.

Show comment
Hide comment
@kuba

kuba Oct 21, 2015

Contributor

Why are you installing stuff to /usr/bin? Please use letsencrypt-auto, other modes of operation are not supported.

Contributor

kuba commented Oct 21, 2015

Why are you installing stuff to /usr/bin? Please use letsencrypt-auto, other modes of operation are not supported.

@NoodlesNZ

This comment has been minimized.

Show comment
Hide comment
@NoodlesNZ

NoodlesNZ Oct 21, 2015

Collaborator

Sorry, my bad. I think I accidentally ran the setup.py when playing around with it. I got a fresh VM and tried again with letsencrypt-auto and this is what I got:

...
Creating virtual environment...
The executable python2.7 (from --python=python2.7) does not exist

So the fix from @dwyer doesn't seem to work. Would it be possible to pin ConfigArgParse to an earlier version that works with python 2.6.x?

Collaborator

NoodlesNZ commented Oct 21, 2015

Sorry, my bad. I think I accidentally ran the setup.py when playing around with it. I got a fresh VM and tried again with letsencrypt-auto and this is what I got:

...
Creating virtual environment...
The executable python2.7 (from --python=python2.7) does not exist

So the fix from @dwyer doesn't seem to work. Would it be possible to pin ConfigArgParse to an earlier version that works with python 2.6.x?

@kuba

This comment has been minimized.

Show comment
Hide comment
@kuba

kuba Oct 21, 2015

Contributor

Can you please update title to "letsencrypt-auto doesn't work with Python 2.6"?

It was decided at some point of the development to discount Python 2.6 support. #957 is meant to bring back this support and is targeted for the General Availability. No support for Centos 6 might bring it even closer.

Contributor

kuba commented Oct 21, 2015

Can you please update title to "letsencrypt-auto doesn't work with Python 2.6"?

It was decided at some point of the development to discount Python 2.6 support. #957 is meant to bring back this support and is targeted for the General Availability. No support for Centos 6 might bring it even closer.

@NoodlesNZ NoodlesNZ changed the title from Centos 6.7 fails to build with letsencrypt-auto to letsencrypt-auto doesn't work with Python 2.6 Oct 21, 2015

@NoodlesNZ

This comment has been minimized.

Show comment
Hide comment
@NoodlesNZ

NoodlesNZ Oct 21, 2015

Collaborator

Done. I'll have a play and see if I can find a work around.

Collaborator

NoodlesNZ commented Oct 21, 2015

Done. I'll have a play and see if I can find a work around.

@kuba

This comment has been minimized.

Show comment
Hide comment
@kuba

kuba Oct 21, 2015

Contributor

(That being said, client should work in Python 2.6, if you use some magic tricks, such as https://github.com/letsencrypt/letsencrypt/blob/v0.0.0.dev20151020/requirements.txt - a file which is a part of the process further described in http://letsencrypt.readthedocs.org/en/latest/contributing.html. But, as I said, we don't support Python 2.6 at this stage!)

Contributor

kuba commented Oct 21, 2015

(That being said, client should work in Python 2.6, if you use some magic tricks, such as https://github.com/letsencrypt/letsencrypt/blob/v0.0.0.dev20151020/requirements.txt - a file which is a part of the process further described in http://letsencrypt.readthedocs.org/en/latest/contributing.html. But, as I said, we don't support Python 2.6 at this stage!)

@bmw

This comment has been minimized.

Show comment
Hide comment
@bmw

bmw Oct 21, 2015

Contributor

Closing since Python 2.6 isn't currently supported. Expect this to change around our official launch date (week of November 16th).

Contributor

bmw commented Oct 21, 2015

Closing since Python 2.6 isn't currently supported. Expect this to change around our official launch date (week of November 16th).

@bmw bmw closed this Oct 21, 2015

@bmw

This comment has been minimized.

Show comment
Hide comment
@bmw

bmw Oct 24, 2015

Contributor

And we're supporting Python 2.6 again! We're looking into resolving these problems.

Contributor

bmw commented Oct 24, 2015

And we're supporting Python 2.6 again! We're looking into resolving these problems.

@bmw bmw reopened this Oct 24, 2015

@durian808

This comment has been minimized.

Show comment
Hide comment
@durian808

durian808 Oct 26, 2015

Joining thread to get updates on Python 2.6 support. Thanks!

durian808 commented Oct 26, 2015

Joining thread to get updates on Python 2.6 support. Thanks!

@mentor2k1

This comment has been minimized.

Show comment
Hide comment
@mentor2k1

mentor2k1 Oct 28, 2015

Joining thread to get updates.

mentor2k1 commented Oct 28, 2015

Joining thread to get updates.

@linickx

This comment has been minimized.

Show comment
Hide comment
@linickx

linickx Oct 28, 2015

For CentOS 6 users, Python 2.7 is part of SCL, the gotcha being that you have to scl enable python27 to enable, prior to running any commands. I am poking at the bootstrap scripts to see if I can make this work. HTH.

linickx commented Oct 28, 2015

For CentOS 6 users, Python 2.7 is part of SCL, the gotcha being that you have to scl enable python27 to enable, prior to running any commands. I am poking at the bootstrap scripts to see if I can make this work. HTH.

@WarpinWolf

This comment has been minimized.

Show comment
Hide comment
@WarpinWolf

WarpinWolf Oct 30, 2015

Joining to get updates....

WarpinWolf commented Oct 30, 2015

Joining to get updates....

@kuba

This comment has been minimized.

Show comment
Hide comment
@kuba

kuba Oct 31, 2015

Contributor

This will be fixed in #1257.

Contributor

kuba commented Oct 31, 2015

This will be fixed in #1257.

@f0086

This comment has been minimized.

Show comment
Hide comment
@f0086

f0086 Nov 4, 2015

Thanks! I've tried your branch/repo and it worked!
Waiting to merge into master ...

f0086 commented Nov 4, 2015

Thanks! I've tried your branch/repo and it worked!
Waiting to merge into master ...

@kuba kuba closed this in bbf4d83 Nov 6, 2015

@durian808

This comment has been minimized.

Show comment
Hide comment
@durian808

durian808 Nov 21, 2015

running letsencrypt-auto, I get this...

"WARNING: Python 2.6 support is very experimental at present...
if you would like to work on improving it, please ensure you have backups
and then run this script again with the --debug flag!"

Where can I sign up for updates so that I'll know when Python 2.6 is fully supported?

thanks

durian808 commented Nov 21, 2015

running letsencrypt-auto, I get this...

"WARNING: Python 2.6 support is very experimental at present...
if you would like to work on improving it, please ensure you have backups
and then run this script again with the --debug flag!"

Where can I sign up for updates so that I'll know when Python 2.6 is fully supported?

thanks

@mayasl

This comment has been minimized.

Show comment
Hide comment
@mayasl

mayasl Dec 4, 2015

Devs! Please take a look at this. http://pastebin.com/Gn70tyKK

mayasl commented Dec 4, 2015

Devs! Please take a look at this. http://pastebin.com/Gn70tyKK

@NoodlesNZ

This comment has been minimized.

Show comment
Hide comment
@NoodlesNZ

NoodlesNZ Dec 20, 2015

Collaborator

For what it's worth python-configargparse is now in EPEL 6/7 with @kuba 's patch for python 2.6

Collaborator

NoodlesNZ commented Dec 20, 2015

For what it's worth python-configargparse is now in EPEL 6/7 with @kuba 's patch for python 2.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment