1

I'm a Mac 10.9.5 OSX user, and I recently installed pyenv using homebrew. Now I'm getting an issue when I try to use pip. Typing pip list produces this error:

-bash: /usr/local/bin/pip: @@HOMEBREW_PREFIX@@/opt/python/bin/python2.7: 
bad interpreter: No such file or directory

Any ideas how to fix this?

Update: I'm pretty sure it has to do with the shebang line in pip (and also easy_install), but I don't know how to fix it. Right now, it's set to #!@@HOMEBREW_PREFIX@@/python/bin/python2.7 Running brew --config, it looks like HOMEBREW_PREFIX = /usr/local I'm not sure where the error is/what's happening...

cvar
  • 31
  • 1
  • 3
  • maybe related: http://stackoverflow.com/questions/26416953/brew-install-python-fails-osx – cel Dec 05 '14 at 17:44
  • Maybe change the shebang to `#!/usr/local/bin/python/bin/python2.7` or, failing that, the same but omitting the first `/bin` from the string. – Mark Setchell Dec 05 '14 at 22:30
  • Or type `which python` to get the full path to it. Or try `find /usr -name python2.7` Then, wherever you find it, prefix `#!` on the front to make your shebang. – Mark Setchell Dec 05 '14 at 22:32

1 Answers1

0

I think I fixed it -- still not entirely sure what the problem was/how it came up, but I unlinked python from homebrew. It fixed both the shebang lines and the error messages.

cvar
  • 31
  • 1
  • 3