Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
virtualenvwrapper Cheat Sheet

local setting

PATH=$PATH:~/.local/bin
source /home/tao/.local/bin/virtualenvwrapper.sh
pip install virtualenvwrapper --user #make everything locally!!

vim, zsh is very hard to install locally without sudo permission.

zsh修改:

export PATH="/home/hut/miniconda3/bin:$PATH"
export VIRTUALENVWRAPPER_PYTHON="/usr/bin/python2"
source "/usr/local/bin/virtualenvwrapper.sh"   
maybe /usr/share/virtualenvwrapper/virtualenvwrapper.sh
(找不到此文件则用 find / -name virtualenvwrapper.sh 来搜索)

Create a virtual env

mkvirtualenv --python=`which python3` <vir_env_name>

List Virtual Environments

lsvirtualenv -b

Change Virtual Environments

workon <vir_env_name>

List site packages

lssitepackages

Exit the Virtual Environments

deactivate 

Remove Virtual Environment

rmvirtualenv <vir_env_name>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.