我试图通过pip install requests
命令安装请求模块(Debian,Python 2.7)。输出是:
Installing collected packages: urllib3, requests
Successfully installed requests-2.18.4 urllib3-1.22
尝试遵循以下Quickstart tutorial但我在import requests
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "requests/__init__.py", line 76, in <module>
check_compatibility(urllib3.__version__, chardet.__version__)
AttributeError: 'module' object has no attribute '__version__'
任何帮助?
答案 0 :(得分:0)
问题在于chardet包。卸载它(pip uninstall chardet)并再次安装,现在它可以正常工作。干杯!