1

I am trying to get the ipynb running on my Mac, but I am running into some trouble. I specifically want to run the ipynb that comes with Anaconda.

This question is very close to helping me but I am not sure what to do with the results from checking which python, which python2.7, which ipython.

When I type 'ipython' into the terminal, I get

/bin/bash: /Users/me/anaconda/bin/python.app: No such file or directory

Anaconda isn't even located in /Users/me/ so I don't know why bash is looking there when I've put /usr/local/bin/anaconda/bin at the front of my path (which I did after that post suggested I check my path variable).

$ which anaconda 
/usr/local/bin/anaconda/bin/anaconda

$ which python
/usr/local/bin/anaconda/bin/python`

$ which python2.7
/usr/local/bin/anaconda/bin/python2.7

$ which ipython
/usr/local/bin/anaconda/bin/ipython

I tried this to see if it worked, because I'm guessing it is related to the problem I am having:

$ conda -h
-bash: /usr/local/bin/anaconda/bin/conda: /Users/me/anaconda/bin/python: bad interpreter: No such file or directory`

From the responses I'm getting from bash, it looks like everything is pointing to where it should be, so then why, when I type ipython or conda into the terminal, do I get those errors?

(Not sure if this is related, but some posts I've seen refer to changing the pip file to point to the version of Python I want, but I am not quite sure where to find the 'pip file'. I went looking for it wherever my pip is stored but I couldn't find a file per say.)

Community
  • 1
  • 1
deets
  • 33
  • 1
  • 7

2 Answers2

1

It is most likely looking in the wrong place. Standard installations would be in /Users/username/anaconda/bin. If you have installed it in /usr/local/bin/anaconda/bin/python you will want to be sure it is in you .bash_profile. In terminal run the following:

open .bash_proflie

Add the following:

export PATH="/usr/local/bin/anaconda/bin:$PATH"

Again the usual Path would be:

export PATH="/Users/me/anaconda/bin:$PATH"

Be sure to relaunch terminal or run "source .bash_profile"

John Morrison
  • 3,810
  • 1
  • 15
  • 15
  • Okay I had originally installed anaconda in /Users/me/Software/ and for some reason moved it to /usr/local/bin but I just moved it back, and made sure my .bash_profile had the correct path export PATH="/Users/me/anaconda/bin:$PATH". but hmmm I am getting the same error I mentioned above.. – deets Feb 10 '16 at 16:49
  • If you moved it back to /Users/me/Software/ the PATH still would not match. The Anaconda directory needs to be put into your /Users/me/ directory or the PATH set to /Users/me/Software/anaconda/bin:$PATH. Be sure the anaconda directory is correct in your PATH and not named anaconda2 or anaconda3. Additionally you can run "conda info -a" and look to see if PYTHONPATH or PYTHONHOME are set, they should not be as it will look to those paths. – John Morrison Feb 10 '16 at 17:50
0

I solved this problem by moving anaconda to root ("/")

cheng
  • 1
  • 1
    While this might solve the problem, moving things to root is not the magic solution. As @John Morrison answers indicate, a search path problem is more likely and should fix the problem. – d00dle Jan 07 '17 at 11:49