Can't install or find python-pip and python-requests using sudo apt-get install

I tried installing python-requests earlier using

sudo apt-get install -y python-requests

and I get

Unable to locate package python-requests

I know this is a common question, but I've tried everything I could find: I ensured I have all repositories enable (Main, universe, etc.). Next, I tried installing python-pip in order to use pip instead of apt, but I got the same error when trying to install python-pip as with python-requests. After that, I used

sudo apt-cache search python-requests
sudo apt-cache search python-pip

to try to see if I had the name wrong or something, but could not locate either. I tried installing

 sudo apt-get install software-properties-common

as some stackoverflow question recommended in addition to running sudo apt-get update many times. Additionally, I ensured that my standard python does indeed point to python-2.7. Any help would be much appreciated!

4

1 Answer

The package python-requests was dropped from Ubuntu after 19.10. However, python3-requests is still in Ubuntu (Main).

The package python-pip is also still in Ubuntu (Universe)

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like