Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Terminal issue with virtualenvwrapper after Mavericks Upgrade

After upgrading to OSX Mavericks, I am getting this message in the terminal:

/usr/bin/python: No module named virtualenvwrapper
virtualenvwrapper.sh: There was a problem running the initialization hooks. 

If Python could not import the module virtualenvwrapper.hook_loader,
check that virtualenv has been installed for
VIRTUALENVWRAPPER_PYTHON=/usr/bin/python and that PATH is
set properly.
like image 759
Ryan Allen Avatar asked Oct 23 '13 18:10

Ryan Allen


4 Answers

Try reinstalling pip and then reinstalling virtualenvwrapper (I had to go through these steps after upgrading to Mavericks):

$ sudo easy_install pip
$ sudo pip install --upgrade virtualenvwrapper
like image 94
Beau Avatar answered Nov 14 '22 05:11

Beau


Re-arrange the export order so that the python path is placed before the virtualenv commands in your .bash_profile file.

# python path
export PATH=/usr/local/bin:$PATH

# needed for virtualenvwrapper
export WORKON_HOME=$HOME/.virtualenvs
source /usr/local/bin/virtualenvwrapper.sh
like image 42
Josh Antweiler Avatar answered Nov 14 '22 05:11

Josh Antweiler


Try edit .bash_profile file

# Home brew
export PATH=/usr/local/bin:$PATH

# virtualenvwrapper 
export WORKON_HOME=$HOME/.virtualenvs
export VIRTUALENVWRAPPER_PYTHON=/usr/local/bin/python
export VIRTUALENVWRAPPER_VIRTUALENV=/usr/local/bin/virtualenv
source /usr/local/bin/virtualenvwrapper.sh
like image 6
Tuan Pham Avatar answered Nov 14 '22 05:11

Tuan Pham


I wouldn't recommend running pip with sudo. This was my solution for the same problem (after upgrading to Mavericks).

In essence, uninstall any virtualenv and brewed Python you had before (use which <command> to check that you removed everything except the system Python in /usr/bin/python) and cleanly install them once again:

brew install python --with-brewed-openssl
# Open a new terminal tab now (to access /usr/local/bin/python)
pip install virtualenv
pip install virtualenvwrapper
like image 4
metakermit Avatar answered Nov 14 '22 05:11

metakermit