there is a simple file `mydown.py` saved in `D:\Python34\Lib\site-packages`<br>
there is only one line in mydown.py .<br> <br>
import requests <br>
<br>
<br>
<br>
C:\Users\pengsir>d:\Python34\python<br>
Python 3.4.0 (v3.4.0:04f714765c13, Mar 16 2014, 19:25:23) [MSC v.1600 64 bit (AM<br>
D64)] on win32<br>
Type "help", "copyright", "credits" or "license" for more information.<br>
>>> import mydown<br>
>>> dir(mydown)<br>
['__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__',<br>
'__package__', '__spec__', 'requests']<br>
>>> url='http://quote.eastmoney.com/hk/02222.html?StockCode=02222'<br>
>>> requests.get(url)<br>
Traceback (most recent call last):<br>
File "<stdin>", line 1, in <module><br>
NameError: name 'requests' is not defined<br>
<br>
why it run into "NameError: name 'requests' is not defined"?<span id="_editor_bookmark_start_0" style="display: none; line-height: 0px;"></span>