[Solved] urllib3 (1.25.3) or chardet (2.2.1) doesn’t match a supported version!

Hi i have faced the same error while running some python script but was able to resolve it with below given command, I hope it works for you too.

Error:-

/usr/lib/python2.7/site-packages/requests/__init__.py:91: RequestsDependencyWarning: urllib3 (1.25.3) or chardet (2.2.1) doesn't match a supported version!
  RequestsDependencyWarning)
Traceback (most recent call last):
  File "/usr/bin/instapy", line 6, in <module>
    from instapy_cli.__main__ import main
  File "/usr/lib/python2.7/site-packages/instapy_cli/__main__.py", line 6, in <module>
    version = pkg_resources.require('instapy_cli')[0].version
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 728, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 630, in resolve
    raise VersionConflict(dist,req) # XXX put more info here
pkg_resources.VersionConflict: (chardet 2.2.1 (/usr/lib/python2.7/site-packages), Requirement.parse('chardet>=3.0.2,<3.1.0'))

Solution:-

pip install --upgrade requests
OR
sudo pip install --upgrade requests

 

Output:-

pip install --upgrade requests
Cache entry deserialization failed, entry ignored
Requirement already up-to-date: requests in /usr/lib/python2.7/site-packages
Collecting chardet<3.1.0,>=3.0.2 (from requests)
Cache entry deserialization failed, entry ignored
Using cached https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl
Cache entry deserialization failed, entry ignored
Requirement already up-to-date: idna<2.9,>=2.5 in /usr/lib/python2.7/site-packages (from requests)
Cache entry deserialization failed, entry ignored
Requirement already up-to-date: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/lib/python2.7/site-packages (from requests)
Cache entry deserialization failed, entry ignored
Requirement already up-to-date: certifi>=2017.4.17 in /usr/lib/python2.7/site-packages (from requests)
Installing collected packages: chardet
Found existing installation: chardet 2.2.1
Uninstalling chardet-2.2.1:
Successfully uninstalled chardet-2.2.1
Successfully installed chardet-3.0.4