Linux installation python3.6.1

Source: Internet
Author: User

Transferred from: http://www.cnblogs.com/kimyeee/p/7250560.html

1. Environment preparation, installation of Zlib-devel and openssl-devel, etc.

Yum-y Install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel Db4-dev El Libpcap-devel Xz-devel

2. Download and install

wget https://www.python.org/ftp/python/3.6.1/Python-3.6.1.tgz

Mkdir-p/usr/local/python3

TAR-ZXVF python-3.6.1.tgz

./configure--prefix=/usr/local/python3

Make && make install

3. Establishing a soft connection

Ln-s/usr/local/python3/bin/python3/usr/bin/python3

4. Add the PATH environment variable

Vim ~/  . Bash_profile#. bash_profile# Get the aliases and functions if  Then  ~/. BASHRCfi# User specific environment and startup Programspath= $PATH: $HOME/bin :/usr/local/python3/Binexport PATH

Then ESC, Wq: Exit

SOURCE ~/.bash_profile

5. Testing

Python3-v

6. Install Pip

Environment:

  Setuptools

  

  wget--no-check-certificate https://pypi.python.org/packages/source/s/setuptools/setuptools-19.6.tar.gz#md5= C607dd118eae682c44ed146367a17e26

TAR-ZXVF setuptools-19.6.tar.gz

CD setuptools-19.6

Python3 setup.py Build

Python3 setup.py Install

Start installation

  

  wget--no-check-certificate https://pypi.python.org/packages/source/p/pip/pip-8.0.2.tar.gz#md5= 3a73c4188f8dbad6a1e6f6d44d117eeb

TAR-ZXVF pip-8.0.2.tar.gz

CD pip-8.0.2

Python3 setup.py Build

Python3 setup.py Install

Test:pip3 Install Paramiko

Linux installation python3.6.1

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.