installation of python3.3 in RHEL7 environment
Background: rhel7.3
python2.7 has been installed in the system, now to implement the Python upgrade;
Download the source tar package first
Http://www.python.org/ftp/python
Download completed to download directory, unzip
Tar XF python-3.3.0.tgz
Go to the Unpacked folder
CD Python-3.3.0
Build a folder in/usr/local before compiling Python3 (as a Python installation path to avoid overwriting the old version)
Mkdir/usr/local/python3
Install dependent packages
Yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel Libpcap-devel Xz-deve
Yum-y Install GCC gcc-c++
Start compiling the installation
./configure--prefix=/usr/local/python3
Make
Make install
The old version is not overwritten at this time, then the original/usr/bin/python link is changed to another name
Previous Python links were as follows:
Link to alias, otherwise the new version will not take effect
MV python2.7 Python2.7_old
Link to build a new version of Python
Ln-s/usr/local/python3/bin/python3/usr/bin/python2.7
The link is as follows:
Check out the Python information again
This method can be installed successfully, but it brings new problems, such as Yum not working properly.
Modify the first behavior of/usr/bin/yum:
The following designation is good:
As below, yum can be used normally
Installation of python3.3 in RHEL7 environment