First and foremost - Indigo uses the built-in Python install(s), located here:
Code: Select all
/System/Library/Frameworks/Python.framework/Code: Select all
FatBook:~ jay$ which python
/usr/bin/python
FatBook:~ jay$ which easy_install
/usr/bin/easy_install
Code: Select all
FatBook:~ jay$ sudo easy_install pipCode: Select all
FatBook:~ jay$ which python
/usr/bin/python
FatBook:~ jay$ which pip
/usr/local/bin/pip
FatBook:~ jay$ pip -V
pip 1.4.1 from /Library/Python/2.7/site-packages/pip-1.4.1-py2.7.egg (python 2.7)
Code: Select all
/Library/Python/2.7/site-packages/The problem comes when you (or some installer you run) install a 3rd party version of Python. The three most common sources of a 3rd party Python install are: homebrew, macports, and python.org. Each will leave the existing preinstalled Pythons alone (so Indigo will continue to work), but they will insert themselves into the process such that you'll have one heck of a time getting required 3rd party modules installed in the correct spot for the preinstalled Python to see (and therefore Indigo plugins and scripts).
I believe homebrew and macports install their Python installs under a directory they create called opt (short for optional):
Code: Select all
/opt/local/Library/Frameworks/Python.framework/Code: Select all
/Library/Frameworks/Python.framework/- They will insert paths into the various .login, .profile, .bashrc files such that their version of Python (and it's executables) are found first when typing any of the python commands from the shell (they also likely install their own pip)
- They set the PYTHONPATH (which is a list of file system paths that the Python interpreter looks in to find modules not part of the standard install) so that they look in their own site-packages directories
The problem is that when you install further modules using pip (the one they installed for you) those modules will get installed into their site-packages directory rather than the one used by the preinstalled Python (/Library/Python/2.7/site-packages/). So anything new you install won't be accessible from the preinstalled Python that Indigo uses. But when you test from a shell script, using the python command, it works. This is because that command isn't using the preinstalled Python. This duality makes it very confusing to figure out what's going on because it appears to work from a shell but not from Indigo.
It is possible that you can manage having multiple Python installs - you just have to remember which paths to executables you need to use to get modules installed in the correct place. However, this is not for the faint of heart.
We highly recommend that you do not install 3rd party Pythons. This will make sure that your Indigo experience is as painless as possible.
This is a duplicate of another post - if you have any comments post on that topic (this one is locked to avoid duplicate posts).