I have both Python 2.7 and 3.4 installed on my Ubuntu 14.04 machine. I want to install the 'requests' module so it is accessible from Py3.4.
When I issued pip install requests
on my terminal cmd line I got back:
"Requirement already satisfied (use --upgrade to upgrade): requests in /usr/lib/python2.7/dist-packages"
How can I direct pip to install requests for 3.4 even though it is already in 2.7?
The Requests library is available for both Python 2 and Python 3 from the Python Package Index (PyPI), and has the following features: Allows you to send HTTP/1.1 PUT, DELETE, HEAD, GET and OPTIONS requests with ease.
You can specify a Python version for pip
to use:
pip3.4 install requests
Python 3.4 has pip support built-in, so you can also use:
python3.4 -m pip install
If you're running Ubuntu (or probably Debian as well), you'll need to install the system pip3
separately:
sudo apt-get install python3-pip
This will install the pip3
executable, so you can use it, as well as the earlier mentioned python3.4 -m pip
:
pip3 install requests
On Windows with Python v3.6.5
py -m pip install requests
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With