CENTOS7 installation Python3

Source: Internet
Author: User

Centos7 Installation Python3 method because CENTOS7 originally installed Python2, and this Python2 can not be deleted, because there are many system commands, such as Yum to use. [[Email Protected]_105_217_centos Python ]-3.6.2]# Pythonpython2.7.5(Default,4  .,xx: the: -) [GCC4.8.5 20150623(Red Hat4.8.5- -)] on Linux2type" Help","Copyright","credits"Or"License"  for  Moreinformation. Enter the python command to see what you know is Python2.7. 5 version Inputwhichpython can view the location, typically in/usr/bin/the Python directory. Here's how to install Python3 first install a dependency packageYum-Y Groupinstall"Development Tools"Yum-YInstallZlib-develbzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-Devel and then according to their own needs to download different versions of Python3, I downloaded the Python3.6.2wgetHttps//Www.python.org/ftp/python/3.6.2/Python-3.6.2.tar.xzIf the speed is not fast enough, you can go directly to the official website to download, using WINSCP and other software to the server designated location, my storage directory is/usr/local/Python3, using the command:mkdir/usr/local/Python3 Create an empty folder and unzip the package, enter the directory, install Python3Tar-XVJF python-3.6.2.Tar. XZCD Python-3.6.2./configure--prefix=/usr/local/Python3 Make&& Make Installfinally create a soft linkLN-s/usr/local/python3/bin/python3/usr/bin/Python3LN-s/usr/local/python3/bin/pip3/usr/bin/PIP3 entering the Python3 test on the command line

CENTOS7 installation Python3

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.