[IPython-dev] Weird PYTHONPATH, etc. issue
d.warde.farley at gmail.com
Mon Sep 24 15:25:44 EDT 2012
On Sun, Sep 23, 2012 at 2:33 AM, David Warde-Farley
<d.warde.farley at gmail.com> wrote:
> On Fri, Sep 21, 2012 at 5:37 AM, Fernando Perez <fperez.net at gmail.com> wrote:
>> Yup. Just a few days ago I had to fix this very problem for a
>> colleague (though in her case, caused by a system-wide EPD install
>> where setuptools was overriding any local PYTHONPATH configuration).
>> After some frustration, I learned of the file 'usercustomize.py':
>> Put a file with this name *anywhere* in your PYTHONPATH, and fix
>> sys.path manually in there to reorder things as needed, e.g.
>> sys.path = [os.environ['HOME']+'.local/lib/python2.7/site-packages/'] + sys.path
> Thanks Fernando! I'll give this a try.
Hmm, this doesn't seem to work, unfortunately. At least, a whole lot
of .egg directories get added to the front of sys.path after
usercustomize.py in ~/.local/lib/site-packages is executed, including
the IPython egg directory. How very annoying.
More information about the IPython-dev