Requests.packages.urllib3.contrib.pyopenssl.inject_into_urllib3(): 'module' object has no attribute 'pyopenssl'

Not sure it’s a proper category for a question…

When I run certbot:

certbot certonly --webroot -w /path/to/docroot -d -d

I get:

Traceback (most recent call last):
  File "/usr/bin/certbot", line 9, in <module>
    load_entry_point('certbot==0.9.3', 'console_scripts', 'certbot')()
  File "/usr/lib/python2.7/dist-packages/pkg_resources/", line 542, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python2.7/dist-packages/pkg_resources/", line 2569, in load_entry_point
    return ep.load()
  File "/usr/lib/python2.7/dist-packages/pkg_resources/", line 2229, in load
    return self.resolve()
  File "/usr/lib/python2.7/dist-packages/pkg_resources/", line 2235, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/lib/python2.7/dist-packages/certbot/", line 19, in <module>
    from certbot import client
  File "/usr/lib/python2.7/dist-packages/certbot/", line 10, in <module>
    from acme import client as acme_client
  File "/usr/lib/python2.7/dist-packages/acme/", line 29, in <module>
AttributeError: 'module' object has no attribute 'pyopenssl'

Versions of relevant packages:

$ dpkg -l | grep python- | egrep '(ssl|urllib|requests)'
ii  python-openssl                      16.0.0-1~bpo8+1               all          Python 2 wrapper around the OpenSSL library
ii  python-requests                     2.11.1-1~bpo8+1               all          elegant and simple HTTP library for Python2, built for human beings
ii  python-urllib3                      1.16-1~bpo8+1                 all          HTTP library with thread-safe connection pooling for Python

Corresponding bug report on GitHub.

I’m running Debian 8 (jessie). I have access to root account on the server, and there no any control panel there.

Thanks in advance.

hi x-yuri

you have posted in the correct forum

can you please run the following command

pip freeze

you should get something that looks like the below (working copy of certbot)

depending on your python install this may not work

i suspect the issue you are facing is due to the fact the pyopenssl has not be installed as a module

can you also articulate how you installed the certbot package?

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