Install Python 2.7.3 on CentOS 5.4

download

$ wget http://www.python.org/ftp/python/2.7.3/Python-2.7.3.tgz
$ tar xvzf Python-2.7.3.tgz

Compile & install

$ cd Python-2.7.3
$ ./configure --enable-shared --prefix=/usr/local/python2.7.3
$ make
$ make install

Operation check

$ /usr/local/python2.7.3/bin/python -V
Python 2.7.3

If the following error occurs in the operation check

$ /usr/local/python2.7.3/bin/python -V
/usr/local/python2.7.3/bin/python: error while loading shared libraries: libpython2.7.so.1.0: cannot open shared object file: No such file or directory

Check shared libraries

$ ldd /usr/local/python2.7.3/bin/python
        libpython2.7.so.1.0 => not found
        libpthread.so.0 => /lib64/libpthread.so.0 (0x0000003eaa000000)
        libdl.so.2 => /lib64/libdl.so.2 (0x0000003ea9c00000)
        libutil.so.1 => /lib64/libutil.so.1 (0x0000003eb6a00000)
        libm.so.6 => /lib64/libm.so.6 (0x0000003ea9800000)
        libc.so.6 => /lib64/libc.so.6 (0x0000003ea9400000)
        /lib64/ld-linux-x86-64.so.2 (0x0000003ea9000000)
libpython2.7.so.1.0 => not found

In the above state, create a symbolic link to the library under / lib64.

ln -s /usr/local/python2.7.3/lib/libpython2.7.so.1.0 /lib64/

Recommended Posts

Install Python3.4 on CentOS 6.6
Install Python 2.7.3 on CentOS 5.4
Install Python 3.8 on CentOS 7 (SCL)
Install Python 3.8 on CentOS 8 (AppStream)
CentOS8 --Install --Python3
Install Python on CentOS using Pyenv
Install Python on CentOS using pyenv
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 3 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 watchdog on Windows + Python 3.3
install python
Install pygame on python3.4 on mac
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] [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 Python 3.8 on Ubuntu 20.04 (OS standard)
Install xgboost (python version) on Windows
Install Python on Windows + pip + virtualenv
Steps to install VirtualBox on CentOS
Install Python 3.7 Anaconda on MAC, but Python 2
Install python3 on Mac (El Capitan)
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
Python on Windows
CentOS8 --Install --Django
Install Python locally
Install NAOqi python
python on mac
Install Python Control