The "Linux" centos6.9 is installed through virtualenv python3.5

Source: Internet
Author: User
Tags virtual environment virtualenv

Reference: http://www.linuxidc.com/Linux/2015-08/121352.htm

wget https://www.python.org/ftp/python/3.5.4/Python-3.5.4.tgz
Tar zxvf python-3.5.4.tgz
CD Python-3.5.4
./configure--prefix=/usr/local
Make && make Altinstall

Fatal Python error:Py_Initialize:Unable to get the locale Encodinglookuperror:unknown encoding:gb180 if you make an error while executing make 30 Modify the Langexport LANG =zh_cn first. UTF-8export LANGUAGE=zh_cn. UTF-8

After running the above command, you can see the newly compiled environment in the directory/usr/local/bin/python3.5.

Note: Here we are using make altinstall, and if you use makes install, you will see that there are two different versions of Python in the system in the/usr/bin/directory. This will lead to a lot of problems and is not easy to handle.

Build PYTHON3 development environment

1, install VIRTUALENV, can be installed through PIP, the command is as follows:

Pip Install Virtualenv

If PIP is not installed, you can install it by using the following command:

Yum Install Python-pip

2. Create a virtual environment:

Virtualenv-p/usr/local/bin/python3.5 py35env

Note: If you are prompted not to find virtualenv then use the full path to execute >>find/-name virtualenv/usr/local/python27/bin/virtualenv

After executing the above command, the Py35env folder is created in the current directory, which is the virtual environment that we created.

3. Activating the Virtual environment:

SOURCE Py35env/bin/activate

3.1. Installing Ipython in a virtual environment

Pip Install Ipython

3.2. Start the Ipython in a virtual environment:

Ipython

4. Exit the virtual environment

Deactivate

"Linux" centos6.9 install python3.5 through virtualenv

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.