程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
您现在的位置: 程式師世界 >> 編程語言 >  >> 更多編程語言 >> Python

Managing multiple Python virtual environments with virtualenvwrapper

編輯:Python

install virtualenvwrapper:

adopt virtualenv Installing a virtual environment , It is troublesome to use , It's annoying to manage . Proposed installation virtualenvwrapper, It makes the virtual environment easy to work .

install :

1

pip install virtualenvwrapper

  Default  virtualenvwrapper  Installed in the  /usr/local/bin  below  

  We can then create a folder to store the virtual environment , Such as :

1

mkdir $HOME/.virtualenvs

  next , We need to configure ~/.bashrc, take virtualenv Add in :

1

2

export WORKON_HOME=$HOME/.virtualenvs

source /usr/local/bin/virtualenvwrapper.sh

  Give Way bashrc take effect :

1

source ~/.bashrc

such , virtualenvwrapper Just install it . We can install the virtual environment with the following command :

1

mkvirtualenv < Virtual environment name >

  This is the time , Will be in WORKON_HOME Create this folder in the specified directory . We can go through workon + <Tab Key > To select a virtual environment . Other swimmers such as lsvirtualenv The command can refer to : http://pythonguidecn.readthedocs.io/zh/latest/dev/virtualenvs.html

Original website  http://www.cnblogs.com/scharfsinnig/p/6700953.html 


  1. 上一篇文章:
  2. 下一篇文章:
Copyright © 程式師世界 All Rights Reserved