Command "python egg_info" failed

Hi, I already checked the other topics on the argument, but there aren’t replies good for my case.
When I run ./letsencrypt-auto (and similar) I get this error:

Command “python egg_info” failed with error code 1 in /tmp/pip-build-ba5ge9s8/python2-pythondialog

I tried with `--verbose`, with this output:

Collecting python2-pythondialog>=3.2.2rc1 (from letsencrypt)
  Using cached python2-pythondialog-3.3.0.tar.gz
    Complete output from command python egg_info:
    Traceback (most recent call last):
      File "<string>", line 20, in <module>
      File "/tmp/pip-build-ba5ge9s8/python2-pythondialog/", line 32, in <module>
        from dialog import __version__ as VERSION
      File "/tmp/pip-build-ba5ge9s8/python2-pythondialog/", line 264
        except OSError, e:
    SyntaxError: invalid syntax

I also tried with other Python versions, but always with the same problem.
I have Debian on the server.


I faced the same error. I’m not sure how it occurred, but it’s attempting to run with python3 instead of python 2.

To resolve this, I removed letsencrypt’s virtualenv (for me, on Ubuntu 15.04, it was located at /home/username/.local/share/letsencrypt/bin) and ran ./letsencrypt-auto again and it worked.