【发布时间】:2016-03-31 10:41:50
【问题描述】:
我的操作系统是 ubuntu 14.04 这是我的代码
from urllib.request import urlopen
html=urlopen("https://github.com/")
print(html.read())
在带有 atom-runner 的 ATOM 中我得到了这个
Traceback (most recent call last):
File "/home/ryan/PYTHON/runnertest.py", line 1, in <module>
from urllib.request import urlopen
ImportError: No module named request
我已经这样设置了 ATOM 的配置
runner:
python: "/usr/bin/python3"
当我像随机导入其他模块时,没有错。
但是当我用 SublimeREPL 在 Sublimetext3 中运行这段代码时(我之前设置它运行 python3)就可以了
那么问题是什么?。? 谢了!!
【问题讨论】:
标签: python-3.x urllib atom-editor