virtualenvwrapper commands aren't working

Desolate picture Desolate · Sep 2, 2012 · Viewed 84k times · Source
tow-81-235:Projects pessimisticoptimism$ mkvirtualenv development
-bash: mkvirtualenv: command not found
tow-81-235:Projects pessimisticoptimism$ sudo pip install virtualenvwrapper
Password:
Requirement already satisfied (use --upgrade to upgrade): virtualenvwrapper in /Library/Python/2.7/site-packages
Requirement already satisfied (use --upgrade to upgrade): virtualenv in /Library/Python/2.7/site-packages (from virtualenvwrapper)
Requirement already satisfied (use --upgrade to upgrade): virtualenv-clone in /Library/Python/2.7/site-packages (from virtualenvwrapper)
Cleaning up...
tow-81-235:Projects pessimisticoptimism$ mkvirtualenv development
-bash: mkvirtualenv: command not found

Why am I getting this error? I have virtualenv and virtualenvwrapper installed. I'd like to use mkvirtualenv and workon. I find it odd that virtualenv is working, but virtualenvwrapper isn't.

Answer

chirinosky picture chirinosky · Dec 6, 2012

1st, ensure you're installing with sudo:

sudo pip install virtualenvwrapper

2nd, append the following lines to your .bashrc file (with nano ~/.bashrc):

export WORKON_HOME=$HOME/.virtualenvs
source /usr/local/bin/virtualenvwrapper.sh

3rd, reload your profile

source ~/.bashrc