0

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!

  • Which Ubuntu release? Do you have the Universe repository enabled? – user535733 May 15 at 11:36
  • Thanks for the comment, my version is 20.04 and yes, I have Universe repository and all other possible repositories enabled. – Elliot Solskjaer May 15 at 11:41
  • 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) – user535733 May 15 at 11:56
  • Thanks, that explains it! – Elliot Solskjaer May 15 at 12:02
1

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)

| improve this answer | |

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.