Error execution certbot-auto--no-bootstrap --no-self-upgrade

Server are debian7.6, with python 2.7. The packages I’m install are:

apt-get install -y --force-yes libffi5 augeas-tools python-pip git
pip install virtualenv

And then clone from github.

When try execute the commando:

$ certbot-auto --no-bootstrap --no-self-upgrade

Creating virtual environment…
Installing Python packages…
Had a problem while installing Python packages.

pip prints the following errors:

Collecting argparse==1.4.0 (from -r /tmp/tmp.devty5Dqa1/letsencrypt-auto-requirements.txt (line 11))
/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/pip/vendor/requests/packages/urllib3/util/ssl.py:318: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#snimissingwarning.
SNIMissingWarning
/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/pip/vendor/requests/packages/urllib3/util/ssl.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
Downloading argparse-1.4.0-py2.py3-none-any.whl
Collecting pycparser==2.14 (from -r /tmp/tmp.devty5Dqa1/letsencrypt-auto-requirements.txt (line 17))
Downloading pycparser-2.14.tar.gz (223kB)
Collecting asn1crypto==0.22.0 (from -r /tmp/tmp.devty5Dqa1/letsencrypt-auto-requirements.txt (line 21))
Downloading asn1crypto-0.22.0-py2.py3-none-any.whl (97kB)
Collecting cffi==1.10.0 (from -r /tmp/tmp.devty5Dqa1/letsencrypt-auto-requirements.txt (line 24))
Downloading cffi-1.10.0-cp27-cp27mu-manylinux1_x86_64.whl (392kB)
Collecting ConfigArgParse==0.12.0 (from -r /tmp/tmp.devty5Dqa1/letsencrypt-auto-requirements.txt (line 61))
Downloading ConfigArgParse-0.12.0.tar.gz (41kB)
Collecting configobj==5.0.6 (from -r /tmp/tmp.devty5Dqa1/letsencrypt-auto-requirements.txt (line 63))
Downloading configobj-5.0.6.tar.gz
Collecting cryptography==2.0.2 (from -r /tmp/tmp.devty5Dqa1/letsencrypt-auto-requirements.txt (line 65))
Downloading cryptography-2.0.2-cp27-cp27mu-manylinux1_x86_64.whl (2.2MB)
Collecting enum34==1.1.2 (from -r /tmp/tmp.devty5Dqa1/letsencrypt-auto-requirements.txt (line 96))
Downloading enum34-1.1.2.tar.gz (46kB)
Collecting funcsigs==1.0.2 (from -r /tmp/tmp.devty5Dqa1/letsencrypt-auto-requirements.txt (line 99))
Downloading funcsigs-1.0.2-py2.py3-none-any.whl
Collecting idna==2.5 (from -r /tmp/tmp.devty5Dqa1/letsencrypt-auto-requirements.txt (line 102))
Downloading idna-2.5-py2.py3-none-any.whl (55kB)
Collecting ipaddress==1.0.16 (from -r /tmp/tmp.devty5Dqa1/letsencrypt-auto-requirements.txt (line 105))
Downloading ipaddress-1.0.16-py27-none-any.whl
Collecting linecache2==1.0.0 (from -r /tmp/tmp.devty5Dqa1/letsencrypt-auto-requirements.txt (line 108))
Downloading linecache2-1.0.0-py2.py3-none-any.whl
Collecting ordereddict==1.1 (from -r /tmp/tmp.devty5Dqa1/letsencrypt-auto-requirements.txt (line 111))
Downloading ordereddict-1.1.tar.gz
Collecting packaging==16.8 (from -r /tmp/tmp.devty5Dqa1/letsencrypt-auto-requirements.txt (line 113))
Downloading packaging-16.8-py2.py3-none-any.whl
Collecting parsedatetime==2.1 (from -r /tmp/tmp.devty5Dqa1/letsencrypt-auto-requirements.txt (line 116))
Downloading parsedatetime-2.1-py2-none-any.whl
Collecting pbr==1.8.1 (from -r /tmp/tmp.devty5Dqa1/letsencrypt-auto-requirements.txt (line 119))
Downloading pbr-1.8.1-py2.py3-none-any.whl (89kB)
Collecting pyOpenSSL==16.2.0 (from -r /tmp/tmp.devty5Dqa1/letsencrypt-auto-requirements.txt (line 122))
Downloading pyOpenSSL-16.2.0-py2.py3-none-any.whl (43kB)
Collecting pyparsing==2.1.8 (from -r /tmp/tmp.devty5Dqa1/letsencrypt-auto-requirements.txt (line 125))
Downloading pyparsing-2.1.8-py2.py3-none-any.whl (54kB)
Collecting pyRFC3339==1.0 (from -r /tmp/tmp.devty5Dqa1/letsencrypt-auto-requirements.txt (line 134))
Downloading pyRFC3339-1.0-py2.py3-none-any.whl
Collecting python-augeas==0.5.0 (from -r /tmp/tmp.devty5Dqa1/letsencrypt-auto-requirements.txt (line 137))
Downloading python-augeas-0.5.0.tar.gz (90kB)
Collecting pytz==2015.7 (from -r /tmp/tmp.devty5Dqa1/letsencrypt-auto-requirements.txt (line 139))
Downloading pytz-2015.7-py2.py3-none-any.whl (476kB)
Collecting requests==2.12.1 (from -r /tmp/tmp.devty5Dqa1/letsencrypt-auto-requirements.txt (line 153))
Downloading requests-2.12.1-py2.py3-none-any.whl (574kB)
Collecting six==1.10.0 (from -r /tmp/tmp.devty5Dqa1/letsencrypt-auto-requirements.txt (line 156))
Downloading six-1.10.0-py2.py3-none-any.whl
Collecting traceback2==1.4.0 (from -r /tmp/tmp.devty5Dqa1/letsencrypt-auto-requirements.txt (line 159))
Downloading traceback2-1.4.0-py2.py3-none-any.whl
Collecting unittest2==1.1.0 (from -r /tmp/tmp.devty5Dqa1/letsencrypt-auto-requirements.txt (line 162))
Downloading unittest2-1.1.0-py2.py3-none-any.whl (96kB)
Collecting zope.component==4.2.2 (from -r /tmp/tmp.devty5Dqa1/letsencrypt-auto-requirements.txt (line 165))
Downloading zope.component-4.2.2.tar.gz (546kB)
Collecting zope.event==4.1.0 (from -r /tmp/tmp.devty5Dqa1/letsencrypt-auto-requirements.txt (line 167))
Downloading zope.event-4.1.0.tar.gz (476kB)
Collecting zope.interface==4.1.3 (from -r /tmp/tmp.devty5Dqa1/letsencrypt-auto-requirements.txt (line 169))
Downloading zope.interface-4.1.3.tar.gz (141kB)
Collecting mock==2.0.0 (from -r /tmp/tmp.devty5Dqa1/letsencrypt-auto-requirements.txt (line 187))
Downloading mock-2.0.0-py2.py3-none-any.whl (56kB)
Collecting letsencrypt==0.7.0 (from -r /tmp/tmp.devty5Dqa1/letsencrypt-auto-requirements.txt (line 198))
Downloading letsencrypt-0.7.0-py2-none-any.whl
Collecting certbot==0.19.0 (from -r /tmp/tmp.devty5Dqa1/letsencrypt-auto-requirements.txt (line 202))
Downloading certbot-0.19.0-py2.py3-none-any.whl (279kB)
Collecting acme==0.19.0 (from -r /tmp/tmp.devty5Dqa1/letsencrypt-auto-requirements.txt (line 205))
Downloading acme-0.19.0-py2.py3-none-any.whl (99kB)
Collecting certbot-apache==0.19.0 (from -r /tmp/tmp.devty5Dqa1/letsencrypt-auto-requirements.txt (line 208))
Downloading certbot_apache-0.19.0-py2.py3-none-any.whl (141kB)
Collecting certbot-nginx==0.19.0 (from -r /tmp/tmp.devty5Dqa1/letsencrypt-auto-requirements.txt (line 211))
Downloading certbot_nginx-0.19.0-py2.py3-none-any.whl (65kB)
Requirement already satisfied: setuptools in /opt/eff.org/certbot/venv/lib/python2.7/site-packages (from zope.component==4.2.2->-r /tmp/tmp.devty5Dqa1/letsencrypt-auto-requirements.txt (line 165))
Installing collected packages: argparse, pycparser, asn1crypto, cffi, ConfigArgParse, six, configobj, idna, enum34, ipaddress, cryptography, funcsigs, linecache2, ordereddict, pyparsing, packaging, parsedatetime, pbr, pyOpenSSL, pytz, pyRFC3339, python-augeas, requests, traceback2, unittest2, zope.interface, zope.event, zope.component, mock, acme, certbot, letsencrypt, certbot-apache, certbot-nginx
Found existing installation: argparse 1.2.1
Not uninstalling argparse at /usr/lib/python2.7, outside environment /opt/eff.org/certbot/venv
Running setup.py install for pycparser: started
Running setup.py install for pycparser: finished with status ‘error’
Complete output from command /opt/eff.org/certbot/venv/bin/python2.7 -u -c "import setuptools, tokenize;file=’/tmp/pip-build-HCTLTu/pycparser/setup.py’;f=getattr(tokenize, ‘open’, open)(file);code=f.read().replace(’
’, ‘
’);f.close();exec(compile(code, file, ‘exec’))" install --record /tmp/pip-vXkSO5-record/install-record.txt --single-version-externally-managed --compile --install-headers /opt/eff.org/certbot/venv/include/site/python2.7/pycparser:
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/pycparser
copying pycparser/init.py -> build/lib.linux-x86_64-2.7/pycparser
copying pycparser/lextab.py -> build/lib.linux-x86_64-2.7/pycparser
copying pycparser/plyparser.py -> build/lib.linux-x86_64-2.7/pycparser
copying pycparser/_build_tables.py -> build/lib.linux-x86_64-2.7/pycparser
copying pycparser/c_parser.py -> build/lib.linux-x86_64-2.7/pycparser
copying pycparser/yacctab.py -> build/lib.linux-x86_64-2.7/pycparser
copying pycparser/ast_transforms.py -> build/lib.linux-x86_64-2.7/pycparser
copying pycparser/_ast_gen.py -> build/lib.linux-x86_64-2.7/pycparser
copying pycparser/c_generator.py -> build/lib.linux-x86_64-2.7/pycparser
copying pycparser/c_lexer.py -> build/lib.linux-x86_64-2.7/pycparser
copying pycparser/c_ast.py -> build/lib.linux-x86_64-2.7/pycparser
creating build/lib.linux-x86_64-2.7/pycparser/ply
copying pycparser/ply/init.py -> build/lib.linux-x86_64-2.7/pycparser/ply
copying pycparser/ply/ctokens.py -> build/lib.linux-x86_64-2.7/pycparser/ply
copying pycparser/ply/lex.py -> build/lib.linux-x86_64-2.7/pycparser/ply
copying pycparser/ply/yacc.py -> build/lib.linux-x86_64-2.7/pycparser/ply
copying pycparser/ply/cpp.py -> build/lib.linux-x86_64-2.7/pycparser/ply
copying pycparser/_c_ast.cfg -> build/lib.linux-x86_64-2.7/pycparser
running install_lib
creating /opt/eff.org/certbot/venv/lib/python2.7/site-packages/pycparser
copying build/lib.linux-x86_64-2.7/pycparser/init.py -> /opt/eff.org/certbot/venv/lib/python2.7/site-packages/pycparser
copying build/lib.linux-x86_64-2.7/pycparser/lextab.py -> /opt/eff.org/certbot/venv/lib/python2.7/site-packages/pycparser
copying build/lib.linux-x86_64-2.7/pycparser/plyparser.py -> /opt/eff.org/certbot/venv/lib/python2.7/site-packages/pycparser
copying build/lib.linux-x86_64-2.7/pycparser/_c_ast.cfg -> /opt/eff.org/certbot/venv/lib/python2.7/site-packages/pycparser
copying build/lib.linux-x86_64-2.7/pycparser/_build_tables.py -> /opt/eff.org/certbot/venv/lib/python2.7/site-packages/pycparser
creating /opt/eff.org/certbot/venv/lib/python2.7/site-packages/pycparser/ply
copying build/lib.linux-x86_64-2.7/pycparser/ply/init.py -> /opt/eff.org/certbot/venv/lib/python2.7/site-packages/pycparser/ply
copying build/lib.linux-x86_64-2.7/pycparser/ply/ctokens.py -> /opt/eff.org/certbot/venv/lib/python2.7/site-packages/pycparser/ply
copying build/lib.linux-x86_64-2.7/pycparser/ply/lex.py -> /opt/eff.org/certbot/venv/lib/python2.7/site-packages/pycparser/ply
copying build/lib.linux-x86_64-2.7/pycparser/ply/yacc.py -> /opt/eff.org/certbot/venv/lib/python2.7/site-packages/pycparser/ply
copying build/lib.linux-x86_64-2.7/pycparser/ply/cpp.py -> /opt/eff.org/certbot/venv/lib/python2.7/site-packages/pycparser/ply
copying build/lib.linux-x86_64-2.7/pycparser/c_parser.py -> /opt/eff.org/certbot/venv/lib/python2.7/site-packages/pycparser
copying build/lib.linux-x86_64-2.7/pycparser/yacctab.py -> /opt/eff.org/certbot/venv/lib/python2.7/site-packages/pycparser
copying build/lib.linux-x86_64-2.7/pycparser/ast_transforms.py -> /opt/eff.org/certbot/venv/lib/python2.7/site-packages/pycparser
copying build/lib.linux-x86_64-2.7/pycparser/_ast_gen.py -> /opt/eff.org/certbot/venv/lib/python2.7/site-packages/pycparser
copying build/lib.linux-x86_64-2.7/pycparser/c_generator.py -> /opt/eff.org/certbot/venv/lib/python2.7/site-packages/pycparser
copying build/lib.linux-x86_64-2.7/pycparser/c_lexer.py -> /opt/eff.org/certbot/venv/lib/python2.7/site-packages/pycparser
copying build/lib.linux-x86_64-2.7/pycparser/c_ast.py -> /opt/eff.org/certbot/venv/lib/python2.7/site-packages/pycparser
byte-compiling /opt/eff.org/certbot/venv/lib/python2.7/site-packages/pycparser/init.py to init.pyc
byte-compiling /opt/eff.org/certbot/venv/lib/python2.7/site-packages/pycparser/lextab.py to lextab.pyc
byte-compiling /opt/eff.org/certbot/venv/lib/python2.7/site-packages/pycparser/plyparser.py to plyparser.pyc
byte-compiling /opt/eff.org/certbot/venv/lib/python2.7/site-packages/pycparser/_build_tables.py to _build_tables.pyc
byte-compiling /opt/eff.org/certbot/venv/lib/python2.7/site-packages/pycparser/ply/init.py to init.pyc
byte-compiling /opt/eff.org/certbot/venv/lib/python2.7/site-packages/pycparser/ply/ctokens.py to ctokens.pyc
byte-compiling /opt/eff.org/certbot/venv/lib/python2.7/site-packages/pycparser/ply/lex.py to lex.pyc
byte-compiling /opt/eff.org/certbot/venv/lib/python2.7/site-packages/pycparser/ply/yacc.py to yacc.pyc
byte-compiling /opt/eff.org/certbot/venv/lib/python2.7/site-packages/pycparser/ply/cpp.py to cpp.pyc
byte-compiling /opt/eff.org/certbot/venv/lib/python2.7/site-packages/pycparser/c_parser.py to c_parser.pyc
byte-compiling /opt/eff.org/certbot/venv/lib/python2.7/site-packages/pycparser/yacctab.py to yacctab.pyc
byte-compiling /opt/eff.org/certbot/venv/lib/python2.7/site-packages/pycparser/ast_transforms.py to ast_transforms.pyc
byte-compiling /opt/eff.org/certbot/venv/lib/python2.7/site-packages/pycparser/_ast_gen.py to _ast_gen.pyc
byte-compiling /opt/eff.org/certbot/venv/lib/python2.7/site-packages/pycparser/c_generator.py to c_generator.pyc
byte-compiling /opt/eff.org/certbot/venv/lib/python2.7/site-packages/pycparser/c_lexer.py to c_lexer.pyc
byte-compiling /opt/eff.org/certbot/venv/lib/python2.7/site-packages/pycparser/c_ast.py to c_ast.pyc
running install_egg_info
running egg_info
writing pycparser.egg-info/PKG-INFO
writing top-level names to pycparser.egg-info/top_level.txt
writing dependency_links to pycparser.egg-info/dependency_links.txt
reading manifest file 'pycparser.egg-info/SOURCES.txt’
reading manifest template 'MANIFEST.in
warning: no previously-included files matching ‘yacctab.’ found under directory 'tests’
warning: no previously-included files matching 'lextab.
’ found under directory 'tests’
warning: no previously-included files matching ‘yacctab.’ found under directory 'examples’
warning: no previously-included files matching 'lextab.
’ found under directory 'examples’
writing manifest file 'pycparser.egg-info/SOURCES.txt’
Copying pycparser.egg-info to /opt/eff.org/certbot/venv/lib/python2.7/site-packages/pycparser-2.14-py2.7.egg-info
running install_scripts
Traceback (most recent call last):
File “”, line 1, in
File “/tmp/pip-build-HCTLTu/pycparser/setup.py”, line 54, in
cmdclass={‘install’: install, ‘sdist’: sdist},
File “/usr/lib/python2.7/distutils/core.py”, line 152, in setup
dist.run_commands()
File “/usr/lib/python2.7/distutils/dist.py”, line 953, in run_commands
self.run_command(cmd)
File “/usr/lib/python2.7/distutils/dist.py”, line 972, in run_command
cmd_obj.run()
File “/tmp/pip-build-HCTLTu/pycparser/setup.py”, line 20, in run
_install.run(self)
File “/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/setuptools/command/install.py”, line 61, in run
return orig.install.run(self)
File “/usr/lib/python2.7/distutils/command/install.py”, line 613, in run
self.run_command(cmd_name)
File “/usr/lib/python2.7/distutils/cmd.py”, line 326, in run_command
self.distribution.run_command(command)
File “/usr/lib/python2.7/distutils/dist.py”, line 972, in run_command
cmd_obj.run()
File “/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/setuptools/command/install_scripts.py”, line 17, in run
import setuptools.command.easy_install as ei
File “/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/setuptools/command/easy_install.py”, line 48, in
from setuptools.py31compat import get_path, get_config_vars
File “/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/setuptools/py31compat.py”, line 2, in
import unittest
File “/usr/lib/python2.7/unittest/init.py”, line 64, in
from .main import TestProgram, main
ImportError: No module named main

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

Command “/opt/eff.org/certbot/venv/bin/python2.7 -u -c “import setuptools, tokenize;file=’/tmp/pip-build-HCTLTu/pycparser/setup.py’;f=getattr(tokenize, ‘open’, open)(file);code=f.read().replace(’
’, ‘
’);f.close();exec(compile(code, file, ‘exec’))” install --record /tmp/pip-vXkSO5-record/install-record.txt --single-version-externally-managed --compile --install-headers /opt/eff.org/certbot/venv/include/site/python2.7/pycparser” failed with error code 1 in /tmp/pip-build-HCTLTu/pycparser/

Certbot has problem setting up the virtual environment.

We were not be able to guess the right solution from your pip
output.

Consult https://certbot.eff.org/docs/install.html#problems-with-python-virtual-environment
for possible solutions.
You may also find some support resources at https://certbot.eff.org/support/ .

When execute the command: certbot-auto–no-bootstrap --no-self-upgrade; I’m get on screen this error bactrace:

certbot-auto --no-bootstrap --no-self-upgrade
Creating virtual environment…
Installing Python packages…
Had a problem while installing Python packages.

pip prints the following errors:

Collecting argparse==1.4.0 (from -r /tmp/tmp.devty5Dqa1/letsencrypt-auto-requirements.txt (line 11))
/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/pip/vendor/requests/packages/urllib3/util/ssl.py:318: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#snimissingwarning.
SNIMissingWarning
/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/pip/vendor/requests/packages/urllib3/util/ssl.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
Downloading argparse-1.4.0-py2.py3-none-any.whl
Collecting pycparser==2.14 (from -r /tmp/tmp.devty5Dqa1/letsencrypt-auto-requirements.txt (line 17))
Downloading pycparser-2.14.tar.gz (223kB)
Collecting asn1crypto==0.22.0 (from -r /tmp/tmp.devty5Dqa1/letsencrypt-auto-requirements.txt (line 21))
Downloading asn1crypto-0.22.0-py2.py3-none-any.whl (97kB)
Collecting cffi==1.10.0 (from -r /tmp/tmp.devty5Dqa1/letsencrypt-auto-requirements.txt (line 24))
Downloading cffi-1.10.0-cp27-cp27mu-manylinux1_x86_64.whl (392kB)
Collecting ConfigArgParse==0.12.0 (from -r /tmp/tmp.devty5Dqa1/letsencrypt-auto-requirements.txt (line 61))
Downloading ConfigArgParse-0.12.0.tar.gz (41kB)
Collecting configobj==5.0.6 (from -r /tmp/tmp.devty5Dqa1/letsencrypt-auto-requirements.txt (line 63))
Downloading configobj-5.0.6.tar.gz
Collecting cryptography==2.0.2 (from -r /tmp/tmp.devty5Dqa1/letsencrypt-auto-requirements.txt (line 65))
Downloading cryptography-2.0.2-cp27-cp27mu-manylinux1_x86_64.whl (2.2MB)
Collecting enum34==1.1.2 (from -r /tmp/tmp.devty5Dqa1/letsencrypt-auto-requirements.txt (line 96))
Downloading enum34-1.1.2.tar.gz (46kB)
Collecting funcsigs==1.0.2 (from -r /tmp/tmp.devty5Dqa1/letsencrypt-auto-requirements.txt (line 99))
Downloading funcsigs-1.0.2-py2.py3-none-any.whl
Collecting idna==2.5 (from -r /tmp/tmp.devty5Dqa1/letsencrypt-auto-requirements.txt (line 102))
Downloading idna-2.5-py2.py3-none-any.whl (55kB)
Collecting ipaddress==1.0.16 (from -r /tmp/tmp.devty5Dqa1/letsencrypt-auto-requirements.txt (line 105))
Downloading ipaddress-1.0.16-py27-none-any.whl
Collecting linecache2==1.0.0 (from -r /tmp/tmp.devty5Dqa1/letsencrypt-auto-requirements.txt (line 108))
Downloading linecache2-1.0.0-py2.py3-none-any.whl
Collecting ordereddict==1.1 (from -r /tmp/tmp.devty5Dqa1/letsencrypt-auto-requirements.txt (line 111))
Downloading ordereddict-1.1.tar.gz
Collecting packaging==16.8 (from -r /tmp/tmp.devty5Dqa1/letsencrypt-auto-requirements.txt (line 113))
Downloading packaging-16.8-py2.py3-none-any.whl
Collecting parsedatetime==2.1 (from -r /tmp/tmp.devty5Dqa1/letsencrypt-auto-requirements.txt (line 116))
Downloading parsedatetime-2.1-py2-none-any.whl
Collecting pbr==1.8.1 (from -r /tmp/tmp.devty5Dqa1/letsencrypt-auto-requirements.txt (line 119))
Downloading pbr-1.8.1-py2.py3-none-any.whl (89kB)
Collecting pyOpenSSL==16.2.0 (from -r /tmp/tmp.devty5Dqa1/letsencrypt-auto-requirements.txt (line 122))
Downloading pyOpenSSL-16.2.0-py2.py3-none-any.whl (43kB)
Collecting pyparsing==2.1.8 (from -r /tmp/tmp.devty5Dqa1/letsencrypt-auto-requirements.txt (line 125))
Downloading pyparsing-2.1.8-py2.py3-none-any.whl (54kB)
Collecting pyRFC3339==1.0 (from -r /tmp/tmp.devty5Dqa1/letsencrypt-auto-requirements.txt (line 134))
Downloading pyRFC3339-1.0-py2.py3-none-any.whl
Collecting python-augeas==0.5.0 (from -r /tmp/tmp.devty5Dqa1/letsencrypt-auto-requirements.txt (line 137))
Downloading python-augeas-0.5.0.tar.gz (90kB)
Collecting pytz==2015.7 (from -r /tmp/tmp.devty5Dqa1/letsencrypt-auto-requirements.txt (line 139))
Downloading pytz-2015.7-py2.py3-none-any.whl (476kB)
Collecting requests==2.12.1 (from -r /tmp/tmp.devty5Dqa1/letsencrypt-auto-requirements.txt (line 153))
Downloading requests-2.12.1-py2.py3-none-any.whl (574kB)
Collecting six==1.10.0 (from -r /tmp/tmp.devty5Dqa1/letsencrypt-auto-requirements.txt (line 156))
Downloading six-1.10.0-py2.py3-none-any.whl
Collecting traceback2==1.4.0 (from -r /tmp/tmp.devty5Dqa1/letsencrypt-auto-requirements.txt (line 159))
Downloading traceback2-1.4.0-py2.py3-none-any.whl
Collecting unittest2==1.1.0 (from -r /tmp/tmp.devty5Dqa1/letsencrypt-auto-requirements.txt (line 162))
Downloading unittest2-1.1.0-py2.py3-none-any.whl (96kB)
Collecting zope.component==4.2.2 (from -r /tmp/tmp.devty5Dqa1/letsencrypt-auto-requirements.txt (line 165))
Downloading zope.component-4.2.2.tar.gz (546kB)
Collecting zope.event==4.1.0 (from -r /tmp/tmp.devty5Dqa1/letsencrypt-auto-requirements.txt (line 167))
Downloading zope.event-4.1.0.tar.gz (476kB)
Collecting zope.interface==4.1.3 (from -r /tmp/tmp.devty5Dqa1/letsencrypt-auto-requirements.txt (line 169))
Downloading zope.interface-4.1.3.tar.gz (141kB)
Collecting mock==2.0.0 (from -r /tmp/tmp.devty5Dqa1/letsencrypt-auto-requirements.txt (line 187))
Downloading mock-2.0.0-py2.py3-none-any.whl (56kB)
Collecting letsencrypt==0.7.0 (from -r /tmp/tmp.devty5Dqa1/letsencrypt-auto-requirements.txt (line 198))
Downloading letsencrypt-0.7.0-py2-none-any.whl
Collecting certbot==0.19.0 (from -r /tmp/tmp.devty5Dqa1/letsencrypt-auto-requirements.txt (line 202))
Downloading certbot-0.19.0-py2.py3-none-any.whl (279kB)
Collecting acme==0.19.0 (from -r /tmp/tmp.devty5Dqa1/letsencrypt-auto-requirements.txt (line 205))
Downloading acme-0.19.0-py2.py3-none-any.whl (99kB)
Collecting certbot-apache==0.19.0 (from -r /tmp/tmp.devty5Dqa1/letsencrypt-auto-requirements.txt (line 208))
Downloading certbot_apache-0.19.0-py2.py3-none-any.whl (141kB)
Collecting certbot-nginx==0.19.0 (from -r /tmp/tmp.devty5Dqa1/letsencrypt-auto-requirements.txt (line 211))
Downloading certbot_nginx-0.19.0-py2.py3-none-any.whl (65kB)
Requirement already satisfied: setuptools in /opt/eff.org/certbot/venv/lib/python2.7/site-packages (from zope.component==4.2.2->-r /tmp/tmp.devty5Dqa1/letsencrypt-auto-requirements.txt (line 165))
Installing collected packages: argparse, pycparser, asn1crypto, cffi, ConfigArgParse, six, configobj, idna, enum34, ipaddress, cryptography, funcsigs, linecache2, ordereddict, pyparsing, packaging, parsedatetime, pbr, pyOpenSSL, pytz, pyRFC3339, python-augeas, requests, traceback2, unittest2, zope.interface, zope.event, zope.component, mock, acme, certbot, letsencrypt, certbot-apache, certbot-nginx
Found existing installation: argparse 1.2.1
Not uninstalling argparse at /usr/lib/python2.7, outside environment /opt/eff.org/certbot/venv
Running setup.py install for pycparser: started
Running setup.py install for pycparser: finished with status ‘error’
Complete output from command /opt/eff.org/certbot/venv/bin/python2.7 -u -c "import setuptools, tokenize;file=’/tmp/pip-build-HCTLTu/pycparser/setup.py’;f=getattr(tokenize, ‘open’, open)(file);code=f.read().replace(’
’, ‘
’);f.close();exec(compile(code, file, ‘exec’))" install --record /tmp/pip-vXkSO5-record/install-record.txt --single-version-externally-managed --compile --install-headers /opt/eff.org/certbot/venv/include/site/python2.7/pycparser:

And the log error next on:

running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/pycparser
copying pycparser/__init__.py -> build/lib.linux-x86_64-2.7/pycparser
copying pycparser/lextab.py -> build/lib.linux-x86_64-2.7/pycparser
copying pycparser/plyparser.py -> build/lib.linux-x86_64-2.7/pycparser
copying pycparser/_build_tables.py -> build/lib.linux-x86_64-2.7/pycparser
copying pycparser/c_parser.py -> build/lib.linux-x86_64-2.7/pycparser
copying pycparser/yacctab.py -> build/lib.linux-x86_64-2.7/pycparser
copying pycparser/ast_transforms.py -> build/lib.linux-x86_64-2.7/pycparser
copying pycparser/_ast_gen.py -> build/lib.linux-x86_64-2.7/pycparser
copying pycparser/c_generator.py -> build/lib.linux-x86_64-2.7/pycparser
copying pycparser/c_lexer.py -> build/lib.linux-x86_64-2.7/pycparser
copying pycparser/c_ast.py -> build/lib.linux-x86_64-2.7/pycparser
creating build/lib.linux-x86_64-2.7/pycparser/ply
copying pycparser/ply/__init__.py -> build/lib.linux-x86_64-2.7/pycparser/ply
copying pycparser/ply/ctokens.py -> build/lib.linux-x86_64-2.7/pycparser/ply
copying pycparser/ply/lex.py -> build/lib.linux-x86_64-2.7/pycparser/ply
copying pycparser/ply/yacc.py -> build/lib.linux-x86_64-2.7/pycparser/ply
copying pycparser/ply/cpp.py -> build/lib.linux-x86_64-2.7/pycparser/ply
copying pycparser/_c_ast.cfg -> build/lib.linux-x86_64-2.7/pycparser
running install_lib
creating /opt/eff.org/certbot/venv/lib/python2.7/site-packages/pycparser
copying build/lib.linux-x86_64-2.7/pycparser/__init__.py -> /opt/eff.org/certbot/venv/lib/python2.7/site-packages/pycparser
copying build/lib.linux-x86_64-2.7/pycparser/lextab.py -> /opt/eff.org/certbot/venv/lib/python2.7/site-packages/pycparser
copying build/lib.linux-x86_64-2.7/pycparser/plyparser.py -> /opt/eff.org/certbot/venv/lib/python2.7/site-packages/pycparser
copying build/lib.linux-x86_64-2.7/pycparser/_c_ast.cfg -> /opt/eff.org/certbot/venv/lib/python2.7/site-packages/pycparser
copying build/lib.linux-x86_64-2.7/pycparser/_build_tables.py -> /opt/eff.org/certbot/venv/lib/python2.7/site-packages/pycparser
creating /opt/eff.org/certbot/venv/lib/python2.7/site-packages/pycparser/ply
copying build/lib.linux-x86_64-2.7/pycparser/ply/__init__.py -> /opt/eff.org/certbot/venv/lib/python2.7/site-packages/pycparser/ply
copying build/lib.linux-x86_64-2.7/pycparser/ply/ctokens.py -> /opt/eff.org/certbot/venv/lib/python2.7/site-packages/pycparser/ply
copying build/lib.linux-x86_64-2.7/pycparser/ply/lex.py -> /opt/eff.org/certbot/venv/lib/python2.7/site-packages/pycparser/ply
copying build/lib.linux-x86_64-2.7/pycparser/ply/yacc.py -> /opt/eff.org/certbot/venv/lib/python2.7/site-packages/pycparser/ply
copying build/lib.linux-x86_64-2.7/pycparser/ply/cpp.py -> /opt/eff.org/certbot/venv/lib/python2.7/site-packages/pycparser/ply
copying build/lib.linux-x86_64-2.7/pycparser/c_parser.py -> /opt/eff.org/certbot/venv/lib/python2.7/site-packages/pycparser
copying build/lib.linux-x86_64-2.7/pycparser/yacctab.py -> /opt/eff.org/certbot/venv/lib/python2.7/site-packages/pycparser
copying build/lib.linux-x86_64-2.7/pycparser/ast_transforms.py -> /opt/eff.org/certbot/venv/lib/python2.7/site-packages/pycparser
copying build/lib.linux-x86_64-2.7/pycparser/_ast_gen.py -> /opt/eff.org/certbot/venv/lib/python2.7/site-packages/pycparser
copying build/lib.linux-x86_64-2.7/pycparser/c_generator.py -> /opt/eff.org/certbot/venv/lib/python2.7/site-packages/pycparser
copying build/lib.linux-x86_64-2.7/pycparser/c_lexer.py -> /opt/eff.org/certbot/venv/lib/python2.7/site-packages/pycparser
copying build/lib.linux-x86_64-2.7/pycparser/c_ast.py -> /opt/eff.org/certbot/venv/lib/python2.7/site-packages/pycparser
byte-compiling /opt/eff.org/certbot/venv/lib/python2.7/site-packages/pycparser/__init__.py to __init__.pyc
byte-compiling /opt/eff.org/certbot/venv/lib/python2.7/site-packages/pycparser/lextab.py to lextab.pyc
byte-compiling /opt/eff.org/certbot/venv/lib/python2.7/site-packages/pycparser/plyparser.py to plyparser.pyc
byte-compiling /opt/eff.org/certbot/venv/lib/python2.7/site-packages/pycparser/_build_tables.py to _build_tables.pyc
byte-compiling /opt/eff.org/certbot/venv/lib/python2.7/site-packages/pycparser/ply/__init__.py to __init__.pyc
byte-compiling /opt/eff.org/certbot/venv/lib/python2.7/site-packages/pycparser/ply/ctokens.py to ctokens.pyc
byte-compiling /opt/eff.org/certbot/venv/lib/python2.7/site-packages/pycparser/ply/lex.py to lex.pyc
byte-compiling /opt/eff.org/certbot/venv/lib/python2.7/site-packages/pycparser/ply/yacc.py to yacc.pyc
byte-compiling /opt/eff.org/certbot/venv/lib/python2.7/site-packages/pycparser/ply/cpp.py to cpp.pyc
byte-compiling /opt/eff.org/certbot/venv/lib/python2.7/site-packages/pycparser/c_parser.py to c_parser.pyc
byte-compiling /opt/eff.org/certbot/venv/lib/python2.7/site-packages/pycparser/yacctab.py to yacctab.pyc
byte-compiling /opt/eff.org/certbot/venv/lib/python2.7/site-packages/pycparser/ast_transforms.py to ast_transforms.pyc
byte-compiling /opt/eff.org/certbot/venv/lib/python2.7/site-packages/pycparser/_ast_gen.py to _ast_gen.pyc
byte-compiling /opt/eff.org/certbot/venv/lib/python2.7/site-packages/pycparser/c_generator.py to c_generator.pyc
byte-compiling /opt/eff.org/certbot/venv/lib/python2.7/site-packages/pycparser/c_lexer.py to c_lexer.pyc
byte-compiling /opt/eff.org/certbot/venv/lib/python2.7/site-packages/pycparser/c_ast.py to c_ast.pyc
running install_egg_info
running egg_info
writing pycparser.egg-info/PKG-INFO
writing top-level names to pycparser.egg-info/top_level.txt
writing dependency_links to pycparser.egg-info/dependency_links.txt
reading manifest file 'pycparser.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching 'yacctab.*' found under directory 'tests'
warning: no previously-included files matching 'lextab.*' found under directory 'tests'
warning: no previously-included files matching 'yacctab.*' found under directory 'examples'
warning: no previously-included files matching 'lextab.*' found under directory 'examples'
writing manifest file 'pycparser.egg-info/SOURCES.txt'
Copying pycparser.egg-info to /opt/eff.org/certbot/venv/lib/python2.7/site-packages/pycparser-2.14-py2.7.egg-info
running install_scripts
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/tmp/pip-build-HCTLTu/pycparser/setup.py", line 54, in <module>
    cmdclass={'install': install, 'sdist': sdist},
  File "/usr/lib/python2.7/distutils/core.py", line 152, in setup
    dist.run_commands()
  File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/tmp/pip-build-HCTLTu/pycparser/setup.py", line 20, in run
    _install.run(self)
  File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/setuptools/command/install.py", line 61, in run
    return orig.install.run(self)
  File "/usr/lib/python2.7/distutils/command/install.py", line 613, in run
    self.run_command(cmd_name)
  File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/setuptools/command/install_scripts.py", line 17, in run
    import setuptools.command.easy_install as ei
  File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 48, in <module>
    from setuptools.py31compat import get_path, get_config_vars
  File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/setuptools/py31compat.py", line 2, in <module>
    import unittest
  File "/usr/lib/python2.7/unittest/__init__.py", line 64, in <module>
    from .main import TestProgram, main
ImportError: No module named main

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

Command “/opt/eff.org/certbot/venv/bin/python2.7 -u -c “import setuptools, tokenize;file=’/tmp/pip-build-HCTLTu/pycparser/setup.py’;f=getattr(tokenize, ‘open’, open)(file);code=f.read().replace(’
’, ‘
’);f.close();exec(compile(code, file, ‘exec’))” install --record /tmp/pip-vXkSO5-record/install-record.txt --single-version-externally-managed --compile --install-headers /opt/eff.org/certbot/venv/include/site/python2.7/pycparser” failed with error code 1 in /tmp/pip-build-HCTLTu/pycparser/

Certbot has problem setting up the virtual environment.

We were not be able to guess the right solution from your pip
output.

Consult https://certbot.eff.org/docs/install.html#problems-with-python-virtual-environment
for possible solutions.
You may also find some support resources at https://certbot.eff.org/support/ .

How solved it?

Do you have multiple versions of PIP installed?
Which version of certbot is installed?
Which version of PIP is installed?

this is not a recommended method

Review recommended install instructions for your os here: https://certbot.eff.org/

Andrei

I have found a solution using python 3.4:

  1. First install pyenv (you can follow this guide: https://amaral.northwestern.edu/resources/guides/pyenv-tutorial ):
    `cd

    git clone git://github.com/yyuu/pyenv.git .pyenv

    echo ‘export PYENV_ROOT="$HOME/.pyenv"’ >> ~/.bashrc

    echo ‘export PATH="$PYENV_ROOT/bin:$PATH"’ >> ~/.bashrc

    echo ‘eval “$(pyenv init -)”’ >> ~/.bashrc

    source ~/.bashrc`

  2. Then install python 3.4:
    pyenv install 3.4.0

  3. After that change to your local python 3.4:
    pyenv local 3.4.0

  4. Create a virtualenv:
    python -m venv certbot

  5. Chage to it:
    source certbot/bin/activate

  6. Upgrade pip:
    pip install --upgrade pip

  7. At the end you can install certbot
    pip install certbot

You can run certbot passing the full path:
/home/your_user/certbot/bin/certbot certonly blablabla

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