Pergunta

After installing Anaconda, when I run python sometimes I load the one provided with Anaconda, and others the one I installed with brew. Both versions are 2.7.6, but I get a Segmentation fault: 11 error, which is probably due to the fact that there are now two options. Is there a way to fix this?

Foi útil?

Solução

The usual fix for problems like this one is to make sure the version you want is first in the search path of your shell (or the other version isn't in the path - but that's sometimes impossible).

With Unix-like systems, check the value of the $PATH variable.

[EDIT] See this document for the general concept of wrapper scripts.

Create such a script with this content:

#!/bin/sh
PATH="/Users/Alberto/anaconda/bi‌​n:$PATH"
export PATH
exec anaconda

This assumes that the Python which you want to use is in the folder /Users/Alberto/anaconda/bi‌​n and that the program which you want to wrap is called anaconda.

Make this script executable. After that, you can start the application using the wrapper script and it should always work.

Note: Platypus might make it easier to use the script.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top