作为一名 Python 开发者。
不会用 **virtualenvwrapper** 我真的只能无语了。
* 安装并激活
```.shell
pip install virtualenvwrapper
source /usr/local/bin/virtualenvwrapper.sh
echo "source /usr/local/bin/virtualenvwrapper.sh" >> ~/.profile
```
* 接着,来创建一个 Django 的虚拟环境
```.bash
mkvirtualenv -p `which python3` -r /path/to/requirements.txt django
```
> 注:
> -p 指定 python 的运行环境
> -r 创建虚拟环境后安装相关的 python 包
* 最后, 我们就可以愉快的 workon 了
```.shell
workon django
```
* tips:
> 可以将 Django 的配置加入到 **$VIRTUAL_ENV/bin/postactivate**
```.shell
cat >> $VIRTUAL_ENV/bin/postactivate
export DJANGO_SETTINGS_MODULE=xxxxxx.settings.stage
```
Congratulations @jiaxin! You received a personal award!
You can view your badges on your Steem Board and compare to others on the Steem Ranking
Vote for @Steemitboard as a witness to get one more award and increased upvotes!
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit