2

I'm trying to install neo into my Anaconda distribution using

conda install -c https://conda.binstar.org/neuroinf neo

(taken from here) but am getting the error:

bash: /transform/anaconda/bin/conda: /usr/local/anaconda/bin/python: bad interpreter: No such file or directory

It's not finding /usr/local/anaconda/bin/python because it doesn't exist. I have anaconda installed in /transform/anaconda/. I've edited my .bashrc file to reflect this but for some reason it's still looking in /usr/local/ (at least in some way, note that it is correctly looking in /transform/ for the first directory argument). What do I need to change to get it to look in /transform/anaconda/bin/python?

echo $PATH returns:

/transform/anaconda/bin:/usr/bin:/transform/anaconda/bin:/usr/bin:/transform/anaconda/bin:/usr/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/PHShome/gcw8/bin

(I realize it's messy, I'll clean it up when I get a minute)

I'm running CentOS and python 2.7.

4
  • 1
    Did you change any of the shebang lines yet? Commented May 26, 2015 at 15:55
  • @IgnacioVazquez-Abrams no I have not, which ones do I need to change? Also, I feel that I should mention that I have used conda install successfully in the past without adding shebang lines Commented May 26, 2015 at 15:57
  • 1
    Maybe you should start with the one mentioned in the error message. Commented May 26, 2015 at 15:58
  • Oh wow, that was actually it. Thank you! Please write your response as an actual answer so I can accept it. Commented May 26, 2015 at 16:02

2 Answers 2

3

Did you move your Anaconda installation? This is not supported, for this exact reason.

After modifying the shebang to fix Anaconda you may need to use conda to uninstall and reinstall any other package that has shebang lines or other hard-coded paths to fix them.

Sign up to request clarification or add additional context in comments.

Comments

2

/transform/anaconda/bin/conda expects the Python executable to be in /usr/local/anaconda/bin/python since that is what is in its shebang line, but you've installed it elsewhere, specifically /transform/anaconda/bin/python. You will need to modify the shebang line to point to the correct location.

1 Comment

I used the following command to replace the old path of all my shebang lines with the new path: sed -i 's/old\/path/new\/path/g' anaconda/bin/* (use the backslash to escape the forward slashes).

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.