0

First of all, I should say that I am not a python expert.

I am struggling with different versions of python installed in my OS. I am running python v2.7 but after an update via brew, I got an issue. When I run a package called ilamb, I get the following error:

/usr/local/bin/ilamb-run: bad interpreter: /usr/local/opt/python/bin/python2.7: no such file or directory

The computer is somehow looking at local/opt folder, which I suspect was created from macports. I unfortunately deleted this folder because I was trying to standardize installations via brew and/or pip to avoid the kind of errors I am struggling with now. However, my python version is located at:

which python
/usr/bin/python

How can I point to the right location?

eFF
  • 267
  • 3
  • 17

2 Answers2

3

Try installing ilamb again using

python -m pip install ILAMB
Cibin
  • 590
  • 1
  • 7
  • 13
1

Believe you used sudo for installation which might have caused this. Try this below:

brew install python
brew linkapps python
brew link --overwrite python 
Tanu
  • 1,503
  • 12
  • 21
  • I had already tried, but it doesn't work: Warning: Already linked: /usr/local/Cellar/python/2.7.14 To relink: brew unlink python && brew link python – eFF Dec 17 '17 at 16:30
  • try this - `ln -s /usr/local/bin/python2 /usr/local/bin/python` to link – Tanu Dec 17 '17 at 16:31
  • Nothing changed – eFF Dec 17 '17 at 16:35
  • Seems like it works for most of the people - https://stackoverflow.com/questions/13354207/how-to-symlink-python-in-homebrew/13354417#13354417 – Tanu Dec 17 '17 at 16:39
  • Yes I know, I tried the last couple of hours all these tricks before I posted. Should be driven by a tiny thing – eFF Dec 17 '17 at 16:50