5

Need to install python packages like pip, numpy, cv2 on an Amazon EC2 instance of Ubuntu. I tried using sudo apt-get install python-pip but got below given error:

ubuntu@ip-172-31-35-131:~$ sudo apt-get install python-pip Reading package lists... Done Building dependency tree
Reading state information... Done E: Unable to locate package python-pip

2 Answers 2

10

Try first sudo apt-get update then

sudo apt-get install python-pip

Sign up to request clarification or add additional context in comments.

1 Comment

Worked for me with sudo apt-get install python3-pip
3

Have you tried the instructions here?

You can install pip from PyPa directly:

curl -O https://bootstrap.pypa.io/get-pip.py
python get-pip.py --user

Your system may have a concurrent python3.x under the name python3, then you can install pip for it with python3 get-pip.py --user as well. (Or contrarily, python2.x under the name python2.)

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.