Virtualenv virtual environment dependency Installation

Source: Internet
Author: User
Virtual Environment dependency Installation

Developers should learn to use virtualenv to manage multiple development environments

Under Ubuntu/centos/MACOs

Virtualenvwrapper makes virtualenv easier to use, so we installed

# Installation: sudo Pip install virtualenv virtualenvwrapper

Modify ~ /. Bashrc or other environment variable-related files (such as. bash_profile or. zshrc after zsh), add the following statement

export WORKON_HOME=$HOME/.virtualenvsexport PROJECT_HOME=$HOME/workspacesource /usr/local/bin/virtualenvwrapper.sh

Make the modification take effect immediately (you can also restart the terminal to make it take effect ):

source ~/.bashrc
Virtual Environment usage

Mkvirtualenv Web# Create a running environment web

Workon Web# Working in the web environment or switching from other environments to the Web Environment

Deactivate# Exit the terminal environment

 

Others:

RmvirtualenvEnv # Delete the running environment env

MkprojectMic # create a mic project and running environment mic

Mktmpenv# Create a temporary running environment

Lsvirtualenv# List available runtime Environments

Lssitepackages# List packages installed in the current environment

The created environment is independent and does not interfere with each other. You can use Pip to manage packages without the sudo permission.

Virtualenv virtual environment dependency Installation

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.