Anaconda does not use PYTHONPATH . However, it should be noted that if the PYTHONPATH parameter is set, it can be used to load a library that is not in the anaconda environment. This is why, before activating the environment, it may be useful to do
unset PYTHONPATH
For example, this PYTHONPATH points to an invalid pandas lib:
export PYTHONPATH=/home/john/share/usr/anaconda/lib/python source activate anaconda-2.7 python >>>> import pandas as pd /home/john/share/usr/lib/python/pandas-0.12.0-py2.7-linux-x86_64.egg/pandas/hashtable.so: undefined symbol: PyUnicodeUCS2_DecodeUTF8 Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/john/share/usr/lib/python/pandas-0.12.0-py2.7-linux-x86_64.egg/pandas/__init__.py", line 6, in <module> from . import hashtable, tslib, lib ImportError: /home/john/share/usr/lib/python/pandas-0.12.0-py2.7-linux-x86_64.egg/pandas/hashtable.so: undefined symbol: PyUnicodeUCS2_DecodeUTF8
Disabling PYTHONPATH prevents the loading of the wrong pandas lib:
unset PYTHONPATH source activate anaconda-2.7 python >>>> import pandas as pd >>>>
inodb Aug 05 '15 at 19:24 2015-08-05 19:24
source share