virtualenv --python

51

python3 -m venv env
python -m virtualenv env #py2

source env/bin/activate

#all this is on same directory
python3 -m venv env
# installs PIP globally
curl https://bootstrap.pypa.io/get-pip.py | python

# installs virtualenv globally
pip install virtualenv

# creates a virtualenv
virtualenv -p python2.7 venv

# activates the virtualenv
source venv/bin/activate

Comments

Submit
0 Comments