I recently installed a bunch of dotfiles on my Mac along with some other applications (I changed to iTerm instead of Terminal, and Sublime as my default text editor) but ever since, all my virtual environments have stopped working, although their folders inside .virtualenvs are still there and they give the following error whenever I try to run anything in them:
dyld: Library not loaded: @executable_path/../.Python
Referenced from: /Users/[user]/.virtualenvs/modclass/bin/python
Reason: image not found
Trace/BPT trap: 5
I have removed all the files related to dotfiles and have restored my .bash_profile to what it was before, but the problem persists. Is there any way to diagnose the problem or solve it in an easy way (e.g. not requiring to create all the virtualenvs all over again)?
rmvirtualenv
still works but when trying to runmkvirtualenv
, I get the following error:-bash: /usr/local/bin/virtualenv: /usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/Resour: bad interpreter: No such file or directory
So, it seems a problem with my python paths but I can't see where the problem is, since I can run python and it seems fine. – Pahoehoevirtualenv
commands are working now in theory, but since there is a problem with python, they don't do anything. So the real problem is with brew's python. And I have a suspicion that the reason is because of a name change in python directories. For some reason, all these commands are looking for python in folder/usr/local/Cellar/python/2.7.6
but the folder's name is actually/usr/local/Cellar/python/2.7.6_1
. – Pahoehoe2.7.6_1
to2.7.6
. If worse came to worst, you could rename it back. – Perrinebrew unlink python && brew link python
followed bybrew linkapps
. Although I think the second part wasn't even necessary since I had tried it before to no avail. Thanks again for the help! – Pahoehoemkdir
) called/usr/local/Cellar/python/2.7.6
and copying (cp -r
) all of the files from/usr/local/Cellar/python/2.7.9
into that folder. I was too nervous to just rename the folder! – Ruthenium