Mac OS and Ubuntu installation Virtualenvwrapper

Source: Internet
Author: User
Tags virtualenv
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

Related Article

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.