CentOS 6 Installation Python3.5

Source: Internet
Author: User
Tags openssl

The installation steps are as follows: 1 prepare the compilation environment (environment if not, you may encounter various problems, such as wget cannot download https linked files) Yum Groupinstall development Toolsyum Install Zlib-devel Bzip2-devel Openssl-devel Ncurses-devel 2 down



1 ready to compile the environment (if the environment is not correct, you may encounter various problems, such as wget unable to download the HTTPS link file)

yum groupinstall  ' Development tools ' yum install zlib-devel bzip2-devel   openssl-devel ncurses-devel 

2 download   3.5 Code Package

wget HTTPS://WWW.PYTHON.ORG/FTP/PYTHON/3.5.0/PYTHON-3.5.0.TAR.XZ

3 compiling

Tar jxvf python-3.5.0.tar.xzcd python-3.5.0./configure--prefix=/usr/local/python3make && make install

4 Setting environment variables

Echo ' Export path= $PATH:/usr/local/python3/bin ' >> ~/.BASHRC

5 or you can replace Python2 directly

rm   /usr/bin/pythonln -sv  /usr/local/python3/bin/python3.5 /usr/bin/ Python 


But at the same time this will result in the python2.6-dependent yum not being used, so also modify the Yum configuration.

6 Update Yum configuration.

Vim/usr/bin/yum change the configuration of Yum via vim #!/usr/bin/python to #!/usr/bin/python2.6

Save exit. Completed the installation of the Python3.

install PIP
PIP is installed according to the website wiki.
1, install Setuptools. Before PIP installation, you need to install Setuptools, which is given in the above page. Download and execute:

wget Https://pypi.python.org/packages/source/s/setuptools/setuptools-5.7.zip--no-check-certificateunzip Setuptools-5.7.zip CD setuptools-5.7python setup.py install wget wget https://pypi.python.org/packages/source/p/pip/ Pip-7.1.2.tar.gz#md5=3823d2343d9f3aaab21cf9c917710196tar xvf pip-7.1.2.tar.gzcd pip-7.1.2python setup.py Install

Just fill it out.

This article is from the "Target: India" blog, please be sure to keep this source http://shunzi115.blog.51cto.com/5184443/1795377

CentOS 6 Installation Python3.5

Related Article

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.