我正在使用python 2.7.12。當我做import requests
時,我看到下面的錯誤。ImportError:無法導入名稱DependencyWarning
試圖卸載&安裝請求,升級pip,但沒有運氣,仍然是同樣的問題。
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
我該如何解決這個問題?
你下載的版本與Python 2.7工作要求?基於它的意思... RequestsDependencyWarning:urllib3(1.13.1)或chardet(2.3.0)與支持的版本不匹配! – J0hn