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