Introduce Python 3.5.2 environment on Amazon Linux

Purpose

Preparation

procedure

Install required packages

$ sudo easy_install virtualenv
$ sudo yum groupinstall 'Development tools'
$ sudo yum install openssl-devel
$ sudo yum install sqlite-devel

Install virtualenv

$ sudo pip install virtualenv

Build Python 3.5.2.

$ mkdir ~/src
$ cd ~/src
$ wget https://www.python.org/ftp/python/3.5.2/Python-3.5.2.tgz
$ tar zxvf Python-3.5.2.tgz
$ cd Python-3.5.2
$ ./configure --prefix=$HOME/local
$ make
$ make install

Environment switching settings

$ virtualenv --python $HOME/local/bin/python3.5 ~/py352

Confirmation of switching

$ source $HOME/py352/bin/activate
(py352)$ python --version
Python 3.5.2
(py352)$ deactivate
$ python --version
Python 2.7.10

Default to Python 3.5.2.

$ echo 'source $HOME/py352/bin/activate' >> ~/.bash_profile

Set the switching command to alias

$ echo 'alias p3="source $HOME/py352/bin/activate"' >> ~/.bash_profile

Recommended Posts

Introduce Python 3.5.2 environment on Amazon Linux
Install Python Pillow on Amazon Linux
How to build a Python environment on amazon linux 2
Building a Python3 environment with Amazon Linux2
Install Python 3.8, Pip 3.8 on EC2 (Amazon Linux 2)
Build Python environment on Windows
Put jenv on Amazon Linux
Build python environment on windows
Install tomcat 5.5 on Amazon Linux.
Use sshpass on Amazon linux2
Install Homebrew on Amazon Linux 2
Install strongSwan 5.9.1 on Amazon Linux 2
Linux environment construction (on WSL environment)
Create an environment for MkDocs on Amazon Linux (attempted)
Compile and install MySQL-python for python2.7 on amazon linux
Building a Python environment on Mac
Prepare pipenv environment with amazon Linux 2
Install LAMP on Amazon Linux 2 and build a WordPress environment.
Python environment construction memo on Windows 10
Prepare Python development environment on Ubuntu
Install oracle java8 on amazon linux2
Building a Python environment on Ubuntu
Try installing OpenAM on Amazon Linux
Install python2.7 on windows 32bit environment
Kivy + Python3 on OSX environment maintenance
Create a Python environment on Mac (2017/4)
Python environment construction memo on Mac
Install pyenv on EC2 (Amazon Linux)
Create a Linux environment on Windows 10
Python development environment construction on macOS
How to create a Python 3.6.0 environment by putting pyenv on Amazon Linux and Ubuntu
Set up Python environment on CentOS
Create a python environment on centos
[Linux] Docker environment construction on Redhat
Environment construction of python3.8 on mac
Install Python development environment on Windows 10
[Note] Install Imagick on Amazon Linux2
[Note] Run Django on Amazon Linux 2
Build Python 3.8 + Pipenv environment on Ubuntu 18.04
Run docker-compose on Amazon Linux2 on ARM64
Build a python3 environment on CentOS7
python> os.path.join ('data','checkpoint')>'data / checkpoint' on linux
OpenCV3 & Python3 environment construction on Ubuntu
Run cron on Amazon Linux (set on Linux)
Build a Selenium environment on Amazon Linux 2 in the shortest time
I'll install Ruby on EC2 (Amazon Linux2) 2020
Python 2.7, 3.4, 3.5 extension module build environment on Windows
Find files like find on linux in Python
Build Python3 and OpenCV environment on Ubuntu 18.04
Build a python environment on MacOS (Catallina)
Python virtual environment and packages on Ubuntu
Create a python environment on your Mac
Use Numpy, Scipy, scikit-learn on Amazon Linux
[C] [python] Read with AquesTalk on Linux
How to update php on Amazon linux 2
Creating a python virtual environment on Windows
Learn sshd_config and authorized_keys (on Amazon Linux 2)
Upgraded mysql on Cloud9 (Amazon Linux) (5.5 to 5,7)
Created Ubuntu, Python, OpenCV environment on Docker
Build Python environment with Anaconda on Mac
How to install Anisble on Amazon Linux 2