A. Mac
Mac platform Test because of the system integrity protection, causing the PIP to install the new version of the package can not unload the old version of the package and then install failed, you need to turn off system integrity protection and reload 1. Disable system integrity protection for Mac OS
1. Click on Mac Apple icon
2. Select Reboot
3. Press and hold command+r until you enter Restore Mode
4. Select the utility, then click Terminal
5. Enter Csrutil Disable press ENTER
2. Installation of virtualenv and Virtualenvwrapper
$ sudo pip install virtualenv
$ sudo pip install Virtualenvwrapper
3. Find the location of virtualenvwrapper.sh
$ which virtualenvwrapper.sh 4. Modify Bash_profile
CD to/users/username/, open with VI Editor. Bash_profile, set up a folder to store virtualenv, add the location you just found, my settings are as follows:
Export Workon_home= $HOME/. Desktop/envs
source/usr/local/bin/virtualenvwrapper.sh
Save Exit VI Editor, run
$ source ~/.bash_profile
5. Restart System Integrity protection for Mac OS
1. Click on Mac Apple icon
2. Select Reboot
3. Press and hold command+r until you enter Restore Mode
4. Select the utility, then click Terminal
5. Enter Csrutil Enable press ENTER
6. Restart the Power Brain
6. Use
Workon displays all the environment names W o r k o n shows all the environment names Workon Display all the environment names Workon environment name Enter/switch to the environment
Deactivate return to System environment D e a C t i v a T e return to system environment deactivate return to System environment MKVIRTUALENV environment name Create environment
$ rmvirtualenv Environment name removal Environment two. Ubuntu 1. Installation
Command: sudo pip install virtualenvwrapper 2 configuration
In the user root (i.e./home/[username]) there is a file. BASHRC, at the end of the file, masks the contents of the If~fi and adds the following at the end:
if [-f/usr/local/bin/virtualenvwrapper.sh]; Then
export workon_home= $HOME/.virtualenvs
source/usr/local/bin/virtualenvwrapper.sh
fi
Exit after saving.
To execute a command:
source. BASHRC
Reloaded into the environment variable.
About virtualenv: http://blog.csdn.net/u013205877/article/details/73159281
Installation on the Windows platform: http:// blog.csdn.net/u013205877/article/details/78290875