CentOS 6.5 installs Python3 and install Virtualenv3__python

Source: Internet
Author: User

Http://linux.it.net.cn/CentOS/course/2015/1010/17718.html



Installation Environment
Yum Install GCC
Yum Install Zlib-devel
Yum Install make

Download the Python version
wget http://www.python.org/ftp/python/3.4.0/Python-3.4.0.tgz

Unzip, compile, and install
TAR-ZXVF python-3.4.0.tgz
CD Python-3.4.0
./configure–prefix=/opt/python3
Make all
Make install
Clears the previously compiled executables and configuration files. Linux Learning, http://linux.it.net.cn
Make clean
Clear all generated files
Make Distclean

View new version information for installation
/opt/python3/bin/python3-v
Python 3.4.0
This shows that the new version of the compiled installation Python is in effect.

Make a soft connection to the current user's Bin directory
Ln-s/opt/python3/bin/python3/usr/bin/python3 ln-s/OPT/PYTHON3/BIN/PIP3/USR/BIN/PIP3

After upgrading the new version of Python, the default remains python2.6
Change the #!/usr/bin/python of the file head to #!/opt/python3/bin/python3.


Install Virtualenv3:


Download source file:

1. Upzip


2. Su Root


3. Python3 setup.py Install


4. Ln-s/opt/python3/bin/virtualenv/usr/bin/virtualenv3







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.