无法为请求和运行时设置模块-没有名为请求的模块

时间:2019-07-09 07:32:06

标签: python beautifulsoup

尝试使用requests时收到以下错误消息:

Error processing line 3 of C:\Program Files\GIMP 2\Python\lib\site-packages\pygtk.pth:

Traceback (most recent call last):
    File "C:\Program Files\GIMP 2\Python\lib\site.py", line 152, in addpackage
      exec line
    File "<string>", line 1, in <module>
ImportError: No module named runtime

Remainder of file ignored
Traceback (most recent call last):
  File "ws1.py", line 1, in <module>
    import requests
ImportError: No module named requests

我该如何解决这个问题?

1 个答案:

答案 0 :(得分:0)

是否已安装请求和运行时?

pip install runtime
pip install requests