I have just update my Mac from Snow Leopard to Lion. I then needed to install virtualenv and virtualenvwrapper. I used for both easy_install.
I also added virtualenvwrapper settings to my .bash_profile file as following:
# virtualenvwrapper settings
export WORKON_HOME="~/virtualenvs"
source "/usr/local/bin/virtualenvwrapper.sh"
But when sourcing it I get the following error:
ERROR: Could not create temporary file name. Make sure TMPDIR is set.
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=/Library/Frameworks/Python.framework/Versions/2.7/bin/python and that PATH is set properly.
Thank you all for your help.
Since
/Library/Frameworks/Python.framework/Versions/2.7/bin/pythonis the path to a separately-installed Python 2.7 (possibly from a python.org installer) rather than the Apple-supplied Python 2.7 (/usr/bin/python2.7), you need to make sure you are using aneasy_installfor that separate Python or change to using the Apple-supplied Python. To do either one, you should ensure that your shell PATH variable is correct. For the first case, you should be able to install aneasy_installby doing the following:You can fix up your shell PATH to include the framework bin directory. If you are using
bash, one way would be to add this line to~/.bash_profile:Then open a new Terminal session. You should now find that
easy_installyou just installed is the right one: