Report this

What is the reason for this report?

Error with python scripts: RequestsDependencyWarning [Python2.7/3.5]

Posted on February 1, 2018

I’ve been ‘stupid’ enough to update all packages with pip using pip freeze --local | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip install -U. Ever since I get the same error with a lot of python scripts:

/usr/local/lib/python2.7/dist-packages/requests/__init__.py:80: RequestsDependencyWarning: urllib3 (1.22) or chardet (2.3.0) doesn't match a supported version! RequestsDependencyWarning)

I’ve googled but did not find anything to solve this so far. Does anyone have a clue?

I’m not able to renew my letsencrypt certificates since certbot gives the same error… :-(

Some more info: when I run certbot I get this message:

/usr/local/lib/python2.7/dist-packages/requests/__init__.py:80: RequestsDependencyWarning: urllib3 (1.22) or chardet (2.3.0) doesn't match a supported version! RequestsDependencyWarning) An unexpected error occurred: ContextualVersionConflict: (cryptography 1.5.2 (/home/user/.local/lib/python2.7/site-packages), Requirement.parse('cryptography>=2.1.4'), set(['PyOpenSSL', 'pyOpenSSL'])) Please see the logfile '/tmp/tmpMMOhyW' for more details.

Contents of /tmp/tmpMMOhyW: 2018-02-01 08:46:17,192:DEBUG:certbot.log:Exiting abnormally: Traceback (most recent call last): File "/usr/local/bin/certbot", line 11, in <module> sys.exit(main()) File "/usr/local/lib/python2.7/dist-packages/certbot/main.py", line 1203, in main plugins = plugins_disco.PluginsRegistry.find_all() File "/usr/local/lib/python2.7/dist-packages/certbot/plugins/disco.py", line 203, in find_all plugin_ep = PluginEntryPoint(entry_point) File "/usr/local/lib/python2.7/dist-packages/certbot/plugins/disco.py", line 50, in __init__ self.plugin_cls = entry_point.load() File "/home/user/.local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2263, in load self.require(*args, **kwargs) File "/home/user/.local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2280, in require items = working_set.resolve(reqs, env, installer) File "/home/user/.local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 861, in resolve raise VersionConflict(dist, req).with_context(dependent_req) ContextualVersionConflict: (cryptography 1.5.2 (/home/user/.local/lib/python2.7/site-packages), Requirement.parse('cryptography>=2.1.4'), set(['PyOpenSSL', 'pyOpenSSL'])) 2018-02-01 08:46:17,192:ERROR:certbot.log:An unexpected error occurred:

Does anyone have a clue?

Specs: Python 2.7/Python 3.5/Ubuntu 16.04



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hey there,

You can try upgrading the following packages in order to resolve the error with the unsupported version – doesn't match a supported version!

  1. pip install --upgrade urllib3 chardet cryptography

Another approach here will be to uninstall the packages and try to install them again. This option is fine as long as you do not have other services that depend on the exact version or will require the packages in order to run.

  1. pip uninstall urllib3 chardet cryptography
  2. pip install urllib3 chardet cryptography

If you continue to experience issues, please refer to the Certbot documentation for more information on resolving dependency conflicts.

Hope that this helps!

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.