virtualenv create python2 enviro

2018-05-06  本文已影响0人  LFBuildMountain

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
上一篇 下一篇

猜你喜欢

热点阅读