I cannot figure out why my python installation is not using the PYTHONPATH environment variable. I'm running Python 3.3 on Mac OS X 10.9.2. Here's my PYTHONPATH and the problem that it doesn't show up in sys.path.
~$ echo $PYTHONPATH
/path/to/dir
~$ python
Python 3.3.3 (default, Dec 30 2013, 23:51:18)
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.2.79)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.path
['', '/usr/local/Cellar/python3/3.3.3...', ..., '/usr/local/Cellar/python3/3.3.3/...']
Any clue where to start looking for a solution?
python -c 'import inspect; import site; print inspect.getfile(site)'
? Thesite
module is supposed to read PYTHONPATH, but there may be another that is shadowing the one insite-packages
. – SethMMorton May 13 at 17:35grep PYTHONPATH
on that file, do you get a hit? Is there also a/usr/local/Cellar/python3/3.3.3/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/site.py
? – SethMMorton May 13 at 17:38