virtualenvwrapper provides a set of commands which makes working with virtual environments much more pleasant. It also places all your virtual environments in one place.
pip install packages
$ sudo pip install virtualenv virtualenvwrapper
Edit the profile ~/.bashrc, add the following lines
... ... # virtualenv and virtualenvwrapper export WORKON_HOME=$HOME/.virtualenvs export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3 source /usr/local/bin/virtualenvwrapper.sh
Apply the profile
$ source ~/.bashrc
$ mkvirtualenv py3cv3 -p python3
py3cv3 is my project name, you can name it as whatever you like (and create as many Python virtual environments as you want).
-p specify the version of python
(env)$ deactivate
$ rmvirtualenv py3cv3
// List all of enviroments $ lsvirtualenv or $ workon // Navigate into the directory of the currently activated virtual environment $ workon your-env $ cdvirtualenv // Like the above, but directly into site-packages directory. $ workon your-env $ cdsitepackages // Shows contents of site-packages directory. $ workon your-env $ lssitepackages
Images 0 | ||
---|---|---|
No images to display in the gallery. |