import requests
r = requests.get('http://bbs.byr.cn/')
print r
The error:
Traceback (most recent call last): File "E:\MyPythonRoad\src\requeststest.py", line 1, in import requests File "C:\Python27\lib\site-packages\requests-2.3.0-py2.7.egg\requests__init__.py", line 58, in from . import utils File "C:\Python27\lib\site-packages\requests-2.3.0-py2.7.egg\requests\utils.py", line 25, in from .compat import parse_http_list as _parse_list_header File "C:\Python27\lib\site-packages\requests-2.3.0-py2.7.egg\requests\compat.py", line 7, in from .packages import chardet File "C:\Python27\lib\site-packages\requests-2.3.0-py2.7.egg\requests\packages__init__.py", line 3, in from . import urllib3 File "C:\Python27\lib\site-packages\requests-2.3.0-py2.7.egg\requests\packages\urllib3__init__.py", line 16, in from .connectionpool import ( File "C:\Python27\lib\site-packages\requests-2.3.0-py2.7.egg\requests\packages\urllib3\connectionpool.py", line 36, in from .connection import ( File "C:\Python27\lib\site-packages\requests-2.3.0-py2.7.egg\requests\packages\urllib3\connection.py", line 43, in from .util import ( ImportError: No module named util
/Library/Python/2.7/site-packages/requests-2.1.0-py2.7.egg/requests/packages/urllib3
and check to see ifutil.py
is there. – A.J. Uppal