python - What is the default if I install virtualenv using pip and pip3 respectively? -
i used sudo pip install virtualenv
, when run virtualenv env
in directory, python 2 virtual enviroment.
if use 'pip3 install virtualenv' install virtualenv again, override previous installation of virtualenv, when run virtualenv env
, python 3 virtual enviroment? or install new virtualenv in different name virtualenv3 in different place ?
you don't need go lengths. can use python 2's virtualenv
create python 3 virtual environment. supposing have python 3's binary installed @ /usr/local/bin/python3
run
virtualenv -p /usr/local/bin/python3 env
and find that
source env/bin/activate
gives python 3 environment want.
Comments
Post a Comment