ImportError: No module named 'requests'

后端 未结 3 366
野的像风
野的像风 2021-01-22 03:24

Getting this error when trying to run a Python script. I have downloaded a requests-1.2.0 folder but I have no idea what to do with it. I\'ve tried running the setup.py file con

3条回答
  •  清酒与你
    2021-01-22 04:08

    You need to run setup.py with the "install" argument. That will install requests in the site-packages folder where it can be imported globally.

    Open a cmd window and navigate to the requests folder that you downloaded. Then type the following into the cmd window:

    C:\python27\python.exe setup.py install
    

    You'll need to change the path to the python executable to match that for your system, of course.

    PS: You're going to love requests!

提交回复
热议问题