Issues with Pip, Python and Virtual Env After Updating Mac 10.10 Yosemite
Published in
1 min readAug 20, 2015
(big help from http://zaidox.com/os-x-mavericks-virtualenv-and-pip.html, seems this was a common problem)
Just to document the issue I had with my local pip, python and virtualenv setup after updating my Mac to 10.10 Yosemite.
A few things I saw initially:
Virtual env seemed to disappear
/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.
jbk[~] $ setup
/usr/bin/python: No module named virtualenvwrapper
/usr/bin/python: No module named virtualenvwrapper
Pip was broken
$ pip
dyld: Library not loaded: @executable_path/../.Python
Referenced from: /Users/jkeesh/.virtualenvs/codehs/bin/python
Reason: image not found
Trace/BPT trap: 5
Pip referenced an old python
$ pip
-bash: /usr/local/share/python/pip: /usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/Resour: bad interpreter: No such file or directory
Python current version was 2.7.6 though the old one seemed to be
2.7.jbk[~/Downloads] $ python
Python 2.7.6 (default, Sep 9 2014, 15:04:36)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)] on darwin
Type “help”, “copyright”, “credits” or “license” for more information.
>>>
The Fix
I had an issue in my PATH variable adding an extra path to the PATH. I removed this from my bashrc
/usr/local/share/python
Then re-installed pip and reinstalled virtual env.