Installing Python3 & pip in AWS EC-2 Instance

In this article we will see how to install python 3 and python pip in AWS EC-2 instance. CentOS 7

First step

Installing epel repository

[root@mail centos]# yum -y install epel-release

Installing python3

[root@mail centos]# yum -y install python3

Then download the script from pypa.io

[root@mail centos]# curl -O https://bootstrap.pypa.io/get-pip.py
   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                  Dload  Upload   Total   Spent    Left  Speed
 100 1842k  100 1842k    0     0  6600k      0 --:--:-- --:--:-- --:--:-- 6604k

To install pip for everyone type the following command

[root@mail centos]# python3 get-pip.py
Collecting pip
Downloading pip-20.3.3-py2.py3-none-any.whl (1.5 MB)
|████████████████████████████████| 1.5 MB 14.9 MB/s
Collecting wheel
Downloading wheel-0.36.2-py2.py3-none-any.whl (35 kB)
Installing collected packages: pip, wheel
Attempting uninstall: pip
Found existing installation: pip 9.0.3
Uninstalling pip-9.0.3:
Successfully uninstalled pip-9.0.3
WARNING: The scripts pip, pip3 and pip3.6 are installed in '/usr/local/bin' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
WARNING: The script wheel is installed in '/usr/local/bin' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed pip-20.3.3 wheel-0.36.2

Add the executable path, ~/.local/bin, to your PATH variable

[root@mail centos]# export PATH=/usr/local/bin:$PATH

Now you should be able to call pip directly

[root@mail centos]# pip --version
pip 20.3.3 from /usr/local/lib/python3.6/site-packages/pip (python 3.6)

Done

Thank you for viewing my article.
If you like what i am doing , please subscribe to my youtube channel and comment. Let me know if you would like to see an article of your choice.
Please share with your friends and family.

Thanks,

Salman Francis

https://www.youtube.com/linuxking
https://www.tekco.net
https://www.facebook.com/linuxking77
Twitter: @linuxking77
Instagram: linuxking77

Leave a Reply

Your email address will not be published. Required fields are marked *

Impact Financial

Good draw knew bred ham busy his hour. Ask agreed answer rather joy nature admire wisdom.

Latest Posts

  • All Posts
  • Amazon
  • Amazon EFS
  • apache
  • AWS
  • aws backup
  • aws cli
  • aws cli version 2
  • aws sync
  • Banking
  • bash scripting
  • Budgeting
  • cloud
  • cyber attack
  • cyber scam
  • database
  • efs
  • Email
  • Email Client
  • Email Server
  • Insurance
  • Investing
  • Learning
  • lets encrypt
  • Linux
  • php
  • pip
  • postgresql
  • python
  • S3
  • s3 buckets
  • scam prevention
  • scams
  • security
  • ssl
  • Tax Strategies
  • Troubleshooting
  • website
  • wordpress
  • wordpress setup
    •   Back
    • Linux tips
    •   Back
    • nextcloud
    •   Back
    • Rainloop

Categories

Tags