Как определяется путь поиска модуля python в Mac OS X?

Когда импортируется не встроенный модуль, интерпретатор выполняет поиск в местах, указанныхsys.path. sys.path инициализируется из этих мест (http://docs.python.org/library/sys.html#sys.path):

the directory containing the input script (or the current directory) PYTHONPATH the installation-dependent default

Хотя первые два источника просты, может ли кто-нибудь объяснить, как работает третий, и какие существуют возможности для воздействия на него?

Хотя мне было бы интересно общее решение, мои конкретные проблемы:

I have installed the Enthought distribution 7.2 32-bit, and then Scipy-Superpack. Now enthought python tries to import numpy from /Library/Python/2.7/, which is where superpack installed them, instead of from the enthought site-packages. a wxPython application created with py2app -A does not have the same sys.path as when starting the application with python start_app.py.

Ответы на вопрос(2)

Ваш ответ на вопрос