Linux installation sandbox virtualenv, Virtualenvwrapper

Source: Internet
Author: User
Tags virtual environment virtualenv

1. Sandbox installation command:

Latest Version: sudo easy_install virtualenv or sudo apt-get install virtualenv

Specified version: Pip install virtualenv [= = Software version number]

Role: Virtualenv is used to create a standalone Python environment where multiple python is independent from each other.
Features: Install new packages without permission, different versions of the suite can be used for different applications, and package upgrades do not affect other applications

2, Installation Virtualenvwrapper

Virtualenvwrapper command:

Latest Version: sudo easy_install virtualenvwrapper or sudo apt-get install Virtualenvwrapper

Specified version: Pip install virtualenvwrapper [= = Software version number]

Role: Virtualenvwrapper is an expansion pack for virtualenv that facilitates the management of virtual environments
Function: Integrate all virtual environments into one directory; manage (add, delete, copy) virtual environments; switch Virtual environments

3. ' Configuration

In the terminal home input:

sudo vim ~/.BASHRC

Enter the configuration file at the end Plus:

Export workon_home= $HOME/.virtualenvsproject_home= $HOME/atguigu/workspacesource/usr/share/virtualenvwrapper/ virtualenvwrapper.sh

Exit file, execute at Terminal

SOURCE ~/.BASHRC

4. Create a virtual environment:

Ways to find the Pyhton version path: in Terminal input:

Whereis python3.5 (Pyhton version number)
In terminal input mkvirtualenv-p Pyhton version of Path virtual environment name for example: Mkvirtualenv-p/us/bin/python3.5 py3

Using Virtual environments:

Workon Virtual Environment name for example: Workon py3

Exiting a virtual environment

Deactivate

  

 

 

Linux installation sandbox virtualenv, Virtualenvwrapper

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.