![Install Python Requests Module Windows Install Python Requests Module Windows](/uploads/1/2/4/8/124865037/925503196.jpg)
Active3 years ago
![Requests Requests](/uploads/1/2/4/8/124865037/321759877.png)
I need to use requests in my code but it says that it's not installed. I get the following error:
No module named 'requests'
. It's actually installed and works in python 2.7: Requirement already satisfied (use --upgrade to upgrade): requests in /Library/Python/2.7/site-packages
. I searched a lot and tried to reinstall it, to download missing libraries, and etc... but nothing helped. How can I make it work on python 3.5 ?Community♦
SteveIf your python version do not belong to any of above mentioned versions then you need to manually install pip (see links below). Click here for windows installation instructions. Click here for linux instructions. Installing packages. Suppose you want to install a package called requests (which is used to make HTTP requests). You need to issue the following command. 2) Unzip the files in your python directory.Exp your python is installed in C:PythonPython.exe then unzip there. 3) Depending on the Os run the following command: Windows use command cd to your python directory location then setup.py install; Linux command: python setup.py install; Thats it:).
Steve38022 gold badges55 silver badges2020 bronze badges
2 Answers
Python 2 and 3 (and their packages) can be installed and co-exist independently of one another. I would suggest using
pip
as the best way to install Python packages (and keep them up-to-date).- Install
pip
for Python 3 – using one of the following methods:easy_install
(may be available aseasy_install-3.5
),- the distribution package manager (if running GNU/Linux) or
python -m ensurepip
(thanks, Mark Dickinson)
- Use
pip
to install therequests
module:
Python Requests Headers
8,44244 gold badges3737 silver badges4545 bronze badges
You can even place the 'requests' Folder (https://github.com/kennethreitz/requests/tree/master/requests) next to your 'script.py' and import requests from any script within the folder containing the requests folder
> root --> requests ---->init.py ----> [more] --> script.py
script.py can now import requests as always
juliusmhjuliusmh