Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to install pip with yum on EC2

I am use AWS with REL 7. the default EC2 mico instance has already install python.

but it encounter below error when i try to install pip by yum.

sudo yum install pip

Loaded plugins: amazon-id, rhui-lb, search-disabled-repos No package pip available. Error: Nothing to do

Anyone advise on how to install pip with yum?

like image 524
Baodi Di Avatar asked Jul 13 '17 07:07

Baodi Di


People also ask

How do I install an EC2 package in Python?

Installing Python on AWS EC2 :Step 1: Create an AWS Elastic Cloud Compute Instance. Step 2: Start the EC2 instance that you have created in Step 1. Step 3: Connect to your EC2 Instance by clicking on Connect Button. Step 4: A prompt will pop up after connecting.

How install AWS CLI pip Linux?

To Install the AWS CLI version 1, use the pip3 command (if you use Python version 3 or later) or the pip command. Verify that the AWS CLI version 1 is installed correctly. If there is no response, see the Add the AWS CLI version 1 executable to your command line path section.


2 Answers

The following worked for me on Amazon Linux AMI 2:

sudo yum -y install python-pip

like image 155
Jonathan Avatar answered Sep 19 '22 18:09

Jonathan


To install pip3.6 in Amazon Linux., there is no python36-pip. If you install python34-pip, it will also install python34 and point to it.

The best option that worked for me is the following:

#Download get-pip to current directory. It won't install anything, as of now curl -O https://bootstrap.pypa.io/get-pip.py  #Use python3.6 to install pip python3 get-pip.py #this will install pip3 and pip3.6    

Based on your preference, if you like to install them for all users, you may choose to run it as 'sudo'

like image 31
Sairam Krish Avatar answered Sep 19 '22 18:09

Sairam Krish