It seems that IPython does not take into account my PYTHONPATH, while a normal python interpreter does it. I’m on windows 7.
My PYTHONPATH:
C:\workspace\python;
C:\Python27\Lib\site-packages\spyderlib;
C:\Workspace\Python\awesim\awesim
Printing the sys.path:
import sys
for i in sorted(sys.path):
print i
Here’s what I obtain in IPython:
C:\JModelica.org-1.8\Python
C:\Python27
C:\Python27\DLLs
C:\Python27\lib
C:\Python27\lib\lib-tk
C:\Python27\lib\plat-win
C:\Python27\lib\site-packages
C:\Python27\lib\site-packages\PIL
C:\Python27\lib\site-packages\Pythonwin
C:\Python27\lib\site-packages\ipython-0.13-py2.7.egg
C:\Python27\lib\site-packages\ipython-0.13-py2.7.egg\IPython\extensions
C:\Python27\lib\site-packages\numpy-1.6.2-py2.7-win32.egg
C:\Python27\lib\site-packages\openpyxl-1.5.8-py2.7.egg
C:\Python27\lib\site-packages\pandas-0.8.1-py2.7-win32.egg
C:\Python27\lib\site-packages\pyzmq-2.2.0.1-py2.7-win32.egg
C:\Python27\lib\site-packages\setuptools-0.6c11-py2.7.egg-info
C:\Python27\lib\site-packages\sphinx-1.1.3-py2.7.egg
C:\Python27\lib\site-packages\statsmodels-0.4.0-py2.7-win32.egg
C:\Python27\lib\site-packages\tornado-2.3-py2.7.egg
C:\Python27\lib\site-packages\win32
C:\Python27\lib\site-packages\win32\lib
C:\Python27\lib\site-packages\wx-2.8-msw-unicode
C:\Python27\scripts
C:\windows\system32\python27.zip
And the same in a python console:
C:\Python27
C:\Python27\DLLs
C:\Python27\Lib\site-packages\spyderlib
C:\Python27\lib
C:\Python27\lib\lib-tk
C:\Python27\lib\plat-win
C:\Python27\lib\site-packages
C:\Python27\lib\site-packages\PIL
C:\Python27\lib\site-packages\Pythonwin
C:\Python27\lib\site-packages\ipython-0.13-py2.7.egg
C:\Python27\lib\site-packages\numpy-1.6.2-py2.7-win32.egg
C:\Python27\lib\site-packages\openpyxl-1.5.8-py2.7.egg
C:\Python27\lib\site-packages\pandas-0.8.1-py2.7-win32.egg
C:\Python27\lib\site-packages\pyzmq-2.2.0.1-py2.7-win32.egg
C:\Python27\lib\site-packages\setuptools-0.6c11-py2.7.egg-info
C:\Python27\lib\site-packages\sphinx-1.1.3-py2.7.egg
C:\Python27\lib\site-packages\statsmodels-0.4.0-py2.7-win32.egg
C:\Python27\lib\site-packages\tornado-2.3-py2.7.egg
C:\Python27\lib\site-packages\win32
C:\Python27\lib\site-packages\win32\lib
C:\Python27\lib\site-packages\wx-2.8-msw-unicode
C:\Workspace\Python\awesim\awesim
C:\windows\system32\python27.zip
C:\workspace\python
You can see that the normal python console reflects the PYTHONPATH, but the IPython output does not.
Thanks on beforehand for your clues.
The .exe launchers linked from the Start Menu are made by setuptools, and it is possible that they do not properly setup your environment (I don’t know enough about Windows environments to say for sure, or if that is fixable).
But if you start IPython from the command-line, it will definitely inherit your environment properly.