美文网首页
virtualenv create python2 enviro

virtualenv create python2 enviro

作者: LFBuildMountain | 来源:发表于2018-05-06 18:04 被阅读0次

environment
default python : anaconda
install python2.7 in C:\Python27

failure approach

install virtualenv

pip install virtualenv

in the target directory
use cmd bash (not git bash, or powershell bash)

virtualenv -p C:\Python27\python.exe website

fail error code 2


successful approach

use conda to create

conda -V
conda update conda

at target directory

conda create -n myenv python=2.7 anaconda
activate myenv

it will modify the PATH variable

install additional package into virtual env

conda install -n myenv tornado 

if don't specify myenv, the package will install into system python installation directory

source deactivate

will deactive current active env

remove env

conda remove -n myenv -all

相关文章

网友评论

      本文标题:virtualenv create python2 enviro

      本文链接:https://www.haomeiwen.com/subject/mluurftx.html