Installation of python3.3 in RHEL7 environment

Source: Internet
Author: User


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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.