ImportError: cannot import name DependencyWarning

importerror cannot import name certs
cannot import name requests
requestsdependencywarning: urllib3 (1.10.2) or chardet (3.0.4) doesn't match a supported version!
importerror cannot import name 'six' from django/utils
importerror cannot import name missingqueueerror
importerror cannot import name appengine_environ from pip _vendor urllib3 contrib
importerror cannot import name snimissingwarning
requestsdependencywarning: urllib3 (1.25 8 or chardet (3.0 4 doesn t match a supported version))

I am using python 2.7.12. When i do import requests, I see the error below.

Tried uninstalling & installing requests, upgrading pip as well, but no luck, still same issue.

Python 2.7.12 (default, Nov 19 2016, 06:48:10)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import requests
/home/test/.local/lib/python2.7/site-packages/requests/__init__.py:80: 
RequestsDependencyWarning: urllib3 (1.13.1) or chardet (2.3.0) doesn't match a supported version!
RequestsDependencyWarning)

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/test/.local/lib/python2.7/site-packages/requests/__init__.py", line 90, in <module>
from urllib3.exceptions import DependencyWarning
ImportError: cannot import name DependencyWarning

How can I solve this?

I had the same error and was able to fix it by upgrading requests with the following command:

sudo pip install --upgrade requests

ImportError: cannot import name DependencyWarning · Issue #164 , I had the same error and was able to fix it by upgrading requests with the following command: sudo pip install --upgrade requests. ImportError: cannot import name DependencyWarning #164. ImportError: cannot import name DependencyWarning root@kali:/faraday-dev# Copy link Quote reply

There are two cases that occur this problem.

  1. There is duplicated PATH of pip.

    apt-get remove python-pip

    easy_install pip

  2. This problem is caused by a mismatch between your pip installation and your requests installation.

    You can solve this issue by updating pip.

ImportError: cannot import name DependencyWarning, 1 ImportError: cannot import name DependencyWarning · Seafile Server · schneimi July 11, 2018, 4:48pm  ImportError: cannot import name 'DependencyWarning' #80. Closed NickGeek opened this issue May 13, cannot import name 'DependencyWarning'

[SOLVED] Upgrade from 6.2.5 to 6.3.1 ImportError: cannot import , from urllib3.exceptions import DependencyWarning ImportError: cannot import name DependencyWarning. Thanks in advance! Here's my env. cannot import name 'DependencyWarning #31. line 60, in <module> from .packages.urllib3.exceptions import DependencyWarning ImportError: cannot import name

If sudo pip install --upgrade requests didn't worked (as in my case) try to uninstall and install requests with no-cache option:

sudo pip --no-cache-dir uninstall requests
sudo pip --no-cache-dir install requests

Platform-io home doesn't work in Atom (ImportError: cannot import , Bug 1344791 - [abrt] liveusb-creator: __init__.py:61:<module>:ImportError: cannot import name DependencyWarning. Summary: [abrt] liveusb-creator:  cannot import name lru_cache #43. Closed Maryam from urllib3.exceptions import DependencyWarning ImportError: cannot import name 'DependencyWarning'

This began happening for me after I installed "awsebcli" via pip, which is a package to support Elastic Beanstalk on AWS for python.

None of the suggested solutions I found online worked and would just result in the same error.

I wound up opening the file mentioned and commenting out the 2 lines about DependencyWarning

#from pip._vendor.requests.packages.urllib3.exceptions import DependencyWarning
#warnings.filterwarnings("ignore", category=DependencyWarning)  # noqa

Then I was okay again

<module>:ImportError: cannot import name DependencyWarning, ImportError: cannot import name DependencyWarning. Description. Environment. Python 2.7.11. Closed. Assignee. Assignee. Chris Bare. Reporter. Reporter. You will get Import Error: ImportError: cannot import name 'a1' But if we change the position of from test.b import b2 in A like below: a.py def a1(): print('a1') b2() from test.b import b2 And the we can get what we want: b1 a1 b2

[SYNPY-374] ImportError: cannot import name DependencyWarning , Testing: $ python3 -c 'import urllib3; print(urllib3.__file__)' should import DependencyWarning ImportError: cannot import name DependencyWarning from​  And because the older wrapper tries from pip import main rather than from pip._internal or its __main__ class against the newer version of the pip package, the pip command from the gist fails with ImportError: cannot import name 'main'. So both pips can co-exist (on the disk) but functionality of the original system one will be "broken"..

Message 287708, ImportError: cannot import name DependencyWarning. importerror cannot import name certs requestsdependencywarning: urllib3 (1.10.2) or chardet (3.0.4)  C:\Users\keigo>pip -v Traceback (most recent call last): File "C:\Users\keigo\Anaconda3\Scripts\pip-script.py", line 6, in <module> from pip import main File "C:\Users\keigo\Anaconda3\lib\site-packages\pip_init_.py", line 21, in <module> from pip._vendor.requests.packages.urllib3.exceptions import DependencyWarning ImportError: cannot import

ImportError: cannot import name DependencyWarning, Summary, 0014570: [abrt] virt-manager: __init__.py:60:<module>:ImportError: cannot import name DependencyWarning. Description  docker 3.3.0 has requirement requests!=2.18.0,>=2.14.2, but you'll have requests 2.6.0 which is incompatible. 👍 3 Sign up for free to join this conversation on GitHub .

Comments
  • Are you downloading a version of requests that works with python 2.7? Based off what it's saying... RequestsDependencyWarning: urllib3 (1.13.1) or chardet (2.3.0) doesn't match a supported version!
  • This solved the issue for me - the error was appearing whenever running Ansible. In my case, Python 3 had no problem with requests but Python 2 did, so I ran sudo pip2 install --upgrade requests instead.
  • Any other suggestions? I've got the same problem which suddenly appeared overnight. Programs that have been executing without any problem for days suddenly are dying with this error. I'm using python3.5