import sys
if sys.version_info[0] >= 3:
from urllib.request import urlretrieve
else:
# Not Python 3 - today, it is most likely to be Python 2
# But note that this might need an update when Python 4
# might be around one day
from urllib import urlretrieve
似乎应该使用python2而不是3。在斯坦福的instruction里有一行:
您还可以阅读它为什么不能在python3here上工作。在
升级版:
对于使用Python 3,可以在使用lib之前尝试添加代码:
升级2: urlretrieve导入没有帮助)
相关问题 更多 >
编程相关推荐