virtualenv使用指南
- 安装
<code class="language-shell">pip install <a href="https://www.gaodaima.com/tag/virtualenv" title="查看更多关于virtualenv的文章" target="_blank">virtualenv</a> </code>
www#gaodaima.com来源gaodai#ma#com搞@@代~&码*网搞代码
- 创建虚拟环境
<code class="language-shell">virtualenv pyweb #pyweb为虚拟环境<a href="https://www.gaodaima.com/tag/%e7%9b%ae%e5%bd%95%e5%90%8d" title="查看更多关于目录名的文章" target="_blank">目录名</a>,目录名 </code>
- 启动虚拟环境
Linux:
(1)虚拟环境的bin目录下,使用如下命令启动
<code class="language-shell">source activate </code>
Windows:
(2)进入虚拟环境目录下的Scripts目录下:
<code class="language-shell">activate </code>
(3)退出虚拟环境
<code class="language-shell">deactivate </code>