Error when using requests In Python2.7
1 2 3 | import requests r = requests.get('http://bbs.byr.cn/') print r |
错误:
Traceback (most recent call last): File
"E:\MyPythonRoad\src
equeststest.py", line 1, in
import requests File"C:\Python27\lib\site-packages
equests-2.3.0-py2.7.egg
equests__init__.py",
line 58, in
from . import utils File"C:\Python27\lib\site-packages
equests-2.3.0-py2.7.egg
equests\utils.py",
line 25, in
from .compat import parse_http_list as _parse_list_header File"C:\Python27\lib\site-packages
equests-2.3.0-py2.7.egg
equests\compat.py",
line 7, in
from .packages import chardet File"C:\Python27\lib\site-packages
equests-2.3.0-py2.7.egg
equests\packages__init__.py",
line 3, in
from . import urllib3 File"C:\Python27\lib\site-packages
equests-2.3.0-py2.7.egg
equests\packages\urllib3__init__.py",
line 16, in
from .connectionpool import ( File"C:\Python27\lib\site-packages
equests-2.3.0-py2.7.egg
equests\packages\urllib3\connectionpool.py",
line 36, in
from .connection import ( File"C:\Python27\lib\site-packages
equests-2.3.0-py2.7.egg
equests\packages\urllib3\connection.py",
line 43, in
from .util import ( ImportError: No module named util
要求
由于您使用的是Windows,因此可能需要尝试通过此二进制文件重新安装
urllib3
根据这一点,您可能想尝试从pypi底部的下载手动下载