I\'m running Mac OS 10.6.8. and wanted to install in addition to python 2.6 also python 2.7 and use python 2.7 in a new virtualenv. I executed the following steps:
I
I had this problem after uninstalling the virtualenvwrapper package. When I logged in to any user (or su to a different one), I would get:
Traceback (most recent call last):
File "", line 1, in
ImportError: No module named virtualenvwrapper.hook_loader
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.
The solution was to delete the /etc/bash_completion.d/virtualenvwrapper file.
Edit:
Do not delete the above file or it won't be recreated if you reinstall virtualenvwrapper. Instead what you need to do is purge the virtualenvwrapper package when you uninstall it. Like this on Debian:
apt-get remove --purge virtualenvwrapper