Install Python3.4 on CentOS 6.6

Install the following on CentOS 6.6.

Notation notes

# :Run as root.
$ :General user(Other than root)Run with.

Python3.4 This time, build from source and install.

1. Preparation

First is the installation of related modules.

# yum groupinstall "Development tools"
# yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel

2. Python source installation

Download the source and configure → make → make alt install.

# cd /usr/local/src
# wget https://www.python.org/ftp/python/3.4.3/Python-3.4.3.tgz
# tar -zxvf Python-3.4.3.tgz 
# cd Python-3.4.3
# ./configure --prefix=/usr/local/python
# make && make altinstall

3. Add to shared library

Make the python library visible to the entire system.

# echo "/usr/local/python/lib" >> /etc/ld.so.conf
# ldconfig

4. Create a symbolic link under / usr / local / bin /

Paste the installed python3.4 link under / usr / local / bin / that is in your PATH.

# ln -s /usr/local/python/bin/python3.4 /usr/local/bin/python
<< Caution >>

Set the PATH value so that / usr / local / bin comes first.

5. Confirmation

You should be able to call python3.4 with python.

# /usr/local/python/bin/python3.4 -V
# python -V

If the above results are the same, the installation is successful.

Easy_Install Easy_Install will put pip, so install it.

# cd /usr/local/src
# wget https://pypi.python.org/…/s/setuptools/setuptools-18.0.1.zip
# unzip setuptools-18.0.1.zip
# cd setuptools-18.0.1
# /usr/local/bin/python setup.py install
# ln -s /usr/local/python/bin/easy_install /usr/local/bin/easy_install

Pip

# /usr/local/bin/easy_install pip
# ln -s /usr/local/python/bin/pip /usr/local/bin/pip

Virtualenv A library for creating a virtual environment for python.

# pip install virtualenv
# ln -s /usr/local/python/bin/virtualenv /usr/local/bin/virtualenv

Virtualenvwrapper This is an extension that collectively manages the virtual environment of virtualenv.

1. Installation

# pip install virtualenvwrapper

2. Settings

Settings are required for each user.

$ vim ~/.bashrc
if [ -f /usr/local/python/bin/virtualenvwrapper.sh ]; then
export WORKON_HOME=$HOME/.virtualenvs
source /usr/local/python/bin/virtualenvwrapper.sh
fi

References

Install python3.3 on CentOS Introduction of Virtualenvwrapper

Recommended Posts

Install Python3.4 on CentOS 6.6
Install Python 2.7.3 on CentOS 5.4
Install Python 3.8 on CentOS 8 (AppStream)
CentOS8 --Install --Python3
Install Python on CentOS using Pyenv
Install Python on CentOS using pyenv
Install python on WSL
Install Faiss on CentOS 7
Install Python on Pidora.
Install Scrapy on python3
Install numba on CentOS 7.2
Install Python on Mac
Install python on windows
Install mecab-python on CentOS
Install Python 3.3 on Ubuntu 12.04
Install Python 3.4 on Mac
Install awscli on centos7
Install Chainer on CentOS 6.7
Install Python 3.6 on Docker
Install Python 3.8 on RHEL 8 (AppStream)
Install watchdog on Windows + Python 3.3
install python
Install pygame on python3.4 on mac
[Ansible] Install dnf on Centos7 with Python3 interpreter
Install ImageMagick-6.2.x series on CentOS7.7
Install pandas 0.14 on python3.4 [on Mac]
Install Python 3.7 and Django 3.0 (CentOS)
Install OpenCV on Ubuntu + python
Install Chrome on CentOS 7 series
Python --Install MySQLDB on EC2
[Python] [Chainer] [Windows] Install Chainer on Windows
Notes on installing Python on CentOS
Install Python Pillow on Amazon Linux
Install Python 3.8 on Ubuntu 18.04 (OS standard)
Steps to install MySQL 8.0 on CentOS 8.1
Install Python3 on Sakura server (FreeBSD)
raspberry pi 4 centos7 install on docker
Install python2.7 on windows 32bit environment
Install xgboost (python version) on Windows
Steps to install VirtualBox on CentOS
Install Pytorch on Blender 2.90 python on Windows
Install Python 3.7 Anaconda on MAC, but Python 2
Install python3 on Mac (El Capitan)
Install java (Oracle JDK14) on CentOS7
How to install PyPy on CentOS
Set up Python environment on CentOS
How to install TensorFlow on CentOS 7
Install pip on CentOS7. Also iPython.
Create a python environment on centos
Install VirtualBox on CentOS 7 on VirtualBox (mac + vagrant)
Install Python 3.9 on Ubuntu 20.04 (OS standard?)
Install Python development environment on Windows 10
Install confluent-kafka for Python on Ubuntu
Install Python 2.7 on Ubuntu 20.04 (OS standard?)
How to install Maven on CentOS
Steps to install python3 on mac
Build a python3 environment on CentOS7
Study Note 9_Install Jenkins on CentOS7
How to install Python2.7 python3.5 with pyenv (on RHEL5 CentOS5) (2016 Nov)
Python2.7 + CentOS7 + OpenCV3
Python on Windows