1. 程式人生 > >Python ImportError: No module named requests

Python ImportError: No module named requests

Requests is not a built in module, so you will have to download it. You can get it here:https://pypi.python.org/pypi/requests

Use $ pip install requests if you have an osx/ linux system with pip installed, or

> Path\easy_install.exe requests if you have a windows machine, where easy_install can be found in your Python\Scripts folder, if it was installed. (Note Path\easy_install.exe is an example, mine is C:\Python32\Scripts\easy_install.exe)

For any missing library, the source is usually available at https://pypi.python.org/pypi/. Then:

If you manually want to add a library to a windows machine, you can download the compressed library, uncompress it, and then place it into the Lib folder of your python path.

On mac osx and windows, after downloading the source zip, uncompress it and from the termiminal/cmd run python setup.py install from the uncompressed dir.