ImportError:没有名为url的模块

时间:2017-02-18 15:26:29

标签: python-3.5

当我在prepare_dataset.py中运行代码如下的给定代码时 from urllib.request import urlopen import json as simplejson

def main(): # Download and prepare datasets list_generator = video_list_generator.Generator("playlists.json", youtube_api_client.Client("AIzaSyD_UC-FpXbJeWzPfscLz9RhqSjKwj33q6A")) video_list = list_generator.get_video_list("piano")

downloader = youtube_video_downloader.Downloader()
downloader.download_from_list(video_list)

if __name__ == '__main__': main()

在命令行中为python prepare_dataset.py然后我得到这些错误

Traceback (most recent call last): File "prepare_dataset.py", line 1, in <module> from urllib.request import urlopen ImportError: No module named request

我怎么能运行上面的文件任何想法的人?

0 个答案:

没有答案