How to Install Python 2.7 on CentOS6.5
2017-01-03 14:25
435 查看
Today, I was trying to install an application on my CentOS 6.5 system which required Python >= 2.7, but there are Python 2.6 installed, which we can’t remove as other application’s depends on it. This tutorial will help you to install Python 2.7 without removing
older versions.
Firstly make sure that you have gcc package installed on your system. Use following command to install gcc if you don’t have it installed.
Download Python using following command from python official site. You can also download latest version in place of specified below.
Use below set of commands to extract Python source code and compile it on your system using altinstall.
make altinstall is used to prevent replacing the default py
4000
thon binary file /usr/bin/python.
Check the latest version installed of python using below command
older versions.
Step 1: Install GCC
Firstly make sure that you have gcc package installed on your system. Use following command to install gcc if you don’t have it installed.# yum install gcc
Step 2: Download Python 2.7
Download Python using following command from python official site. You can also download latest version in place of specified below.# cd /usr/src # wget https://www.python.org/ftp/python/2.7.12/Python-2.7.12.tgz
Step 3: Extract Archive and Compile
Use below set of commands to extract Python source code and compile it on your system using altinstall.# tar xzf Python-2.7.12.tgz # cd Python-2.7.12 # ./configure # make altinstall
make altinstall is used to prevent replacing the default py
4000
thon binary file /usr/bin/python.
Step 4: Check the Python Version
Check the latest version installed of python using below command# python2.7 -V Python 2.7.12
相关文章推荐
- How to install Python 2.7 and Python 3.3 on CentOS 6
- How To Install Python 2.7 with mod_wsgi on CentOS 5.6 with cPanel
- How to install Python 2.7 and Python 3.3 on CentOS 6
- How to install Python 2.7.3 on CentOS 6.2
- Python 2.7 install on centos 6.5
- How to install php memcached on CentOS 6.5
- How to install Python 2.7.3 on CentOS 6.2
- How to install python, wxPython and ride on CENTOS
- How to Install Linux, Apache, MySQL, PHP (LAMP) stack on CentOS 6 【Reliable】
- How to install HipHop for PHP on CentOS 5.x
- How to install scp on CentOS
- centos howto yum install mysql-python
- How to install innotop on centos
- howto install Oracle VirtualBox Guest Additions on Fedora, CentOS and Red Hat (RHEL).
- [转]How to install PHP 5.3 on CentOS
- How to install Firefox 17 on Linux Mint, Ubuntu, Debian, CentOS, Fedora ... or any other Linux dist
- How to Install MySQL Database Using Yum groupinstall on CentOS
- HowTo Install Python + Django + Aptana Studio on Windows
- How to Install php-mcrypt on CentOS 6.2
- 转载--How to Install VMware Tools on CentOS 6.3