创建虚拟环境需要的准备
暂存一个图
安装包 virtualenv
》安装命令
pip install virtualenv
》安装时的效果
C:\Users\python_hui>pip install virtualenv
Collecting virtualenv
Downloading https://files.pythonhosted.org/packages/5e/6a/fa7e7f533595402040c831500bb10576e1f4b8f54d476f3994c7c55d8f5e/virtualenv-16.7.3-py2.py3-none-any.whl (3.3MB)
100% |████████████████████████████████| 3.3MB 93kB/s
Installing collected packages: virtualenv
Successfully installed virtualenv-16.7.3
C:\Users\python_hui>
安装好后,就可以利用这个包来创建和切换虚拟环境了
不过,由于该包的操作虚拟环境的命令比较麻烦
通常我们会再装一个包,使命令更简单一些
安装辅助包
》安装命令
pip install virtualenvwrapper-win
》效果
C:\Users\python_hui>pip install virtualenvwrapper-win
Collecting virtualenvwrapper-win
Downloading https://files.pythonhosted.org/packages/f5/23/4cba98733b9122219ce67177d745e4984b524b867cf3728eaa807ea21919/virtualenvwrapper-win-1.2.5.tar.gz
Requirement already satisfied: virtualenv in c:\users\python_hui\anaconda3\lib\site-packages (from virtualenvwrapper-win) (16.7.3)
Building wheels for collected packages: virtualenvwrapper-win
Building wheel for virtualenvwrapper-win (setup.py) ... done
Stored in directory: C:\Users\python_hui\AppData\Local\pip\Cache\wheels\47\d1\ae\85075521c1fbe2edb6784af24ccc79af10bbb205cc711a689c
Successfully built virtualenvwrapper-win
Installing collected packages: virtualenvwrapper-win
Successfully installed virtualenvwrapper-win-1.2.5
》配置环境
使用命令创建环境。。。
好像和anaconda冲突了
未能创建成功
有空了继续,使用纯python再试