Install Python 3.8, Pip 3.8 on EC2 (Amazon Linux 2)

Install Python 3.8 on Amazon Linux2

If you have trouble installing Python 3.8 or Pip 3.8 on Amazon Linux 2, please refer to it.

Advance preparation

$ sudo yum -y update
$ sudo yum -y install gcc openssl-devel bzip2-devel libffi-devel

download

$ wget https://www.python.org/ftp/python/3.8.1/Python-3.8.1.tgz
$ tar xzf Python-3.8.1.tgz

Installation

$ cd Python-3.8.1
$ sudo ./configure --enable-optimizations
$ sudo make altinstall

Verification

$ python3.8 --version
Python 3.8.1
$ pip3.8 --version
pip 19.2.3 from /usr/local/lib/python3.8/site-packages/pip (python 3.8)

Set root path

Make a symbolic link through the path so that Python 3.8 can be used from root as well.

$ sudo which python3.8
which: no python3.8 in (/sbin:/bin:/usr/sbin:/usr/bin)
$ sudo visudo
(Before)
Defaults    secure_path = /sbin:/bin:/usr/sbin:/usr/bin
(After)
Defaults    secure_path = /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
$ sudo which python3.8
/usr/local/bin/python3.8
$ sudo ln -s /usr/local/bin/python3.8 /usr/local/bin/python3
$ sudo which python3
/usr/local/bin/python3
$ sudo ln -s /usr/local/bin/pip3.8 /usr/local/bin/pip3
$ sudo which pip3
/usr/local/bin/pip3

Recommended Posts

Install Python 3.8, Pip 3.8 on EC2 (Amazon Linux 2)
Install Python Pillow on Amazon Linux
Install pyenv on EC2 (Amazon Linux)
Python --Install MySQLDB on EC2
Install tomcat 5.5 on Amazon Linux.
Install Homebrew on Amazon Linux 2
Install strongSwan 5.9.1 on Amazon Linux 2
Install Python3 and Django on Amazon Linux (EC2) and run your web server
Compile and install MySQL-python for python2.7 on amazon linux
[AWS EC2] How to install Maven on Amazon Linux 2
Install oracle java8 on amazon linux2
Install Python on Windows + pip + virtualenv
[Note] Install Imagick on Amazon Linux2
Introduce Python 3.5.2 environment on Amazon Linux
scipy stumbles with pip install on python 2.7.8
Install python on xserver to use pip
Install python on WSL
Install pip on Mavericks
Install Scrapy on python3
Install Python on Mac
Install Python 3 on Mac
Install Python3.4 on CentOS 6.6
Install python on windows
Install Python 2.7.3 on CentOS 5.4
Install Python 3.3 on Ubuntu 12.04
Install Python 3.4 on Mac
Install pip / pip3 on Ubuntu
Install Python 3.6 on Docker
[2020 version] How to install Python3 on AWS EC2
Run pip install on MacOS Python 3.7 or later
Install PHP 7 series on Amazon Linux 2 with Amazon Linux Extras
Install ZIP version Python and pip on Windows 10
Run a batch of Python 2.7 with nohup on Amazon Linux AMI on EC2
Install Minecraft on Arch Linux
Install Python 3.8 on RHEL 8 (AppStream)
Install Linux on your Chromebox
Install watchdog on Windows + Python 3.3
Install pygame on python3.4 on mac
Install Python 3.8 on CentOS 7 (SCL)
Install the JDK on Linux
Put jenv on Amazon Linux
Install pandas 0.14 on python3.4 [on Mac]
Install OpenCV on Ubuntu + python
How to install git on Linux such as EC2
[Python] [Chainer] [Windows] Install Chainer on Windows
How to build a Python environment on amazon linux 2
[AWS EC2] How to install only MySQL client on Amazon Linux 2 and connect to RDS
Install LAMP on Amazon Linux 2 and build a WordPress environment.
[AWS EC2] Settings you want to do on Amazon Linux 2
Summary of yum packages required for pip install on EC2
Launch NEM Symbol testnet node on AWS EC2 (Amazon Linux2)
Install Python 3.8 on Ubuntu 18.04 (OS standard)
Install Python 2.7.9 and Python 3.4.x with pip.
Install Python3 on Sakura server (FreeBSD)
Pip install --ugrade pip fails on Windows
Install Python 3.8 on Ubuntu 20.04 (OS standard)
Install python2.7 on windows 32bit environment
pip install mysql-Error handling during python
Install CUDA on Linux Mint Mate 20
Install Arch Linux on DeskMini A300
Install Pytorch on Blender 2.90 python on Windows