In article <528e8aac.1090...@stsci.edu>, Michael Droettboom <md...@stsci.edu> wrote:
> When you use |--home|, distutils assumes you are referring to a home > directory in which you have a tree of libraries in |lib|lib64| living > there, so it appends |lib64/python| to the given path: > > |> python setup.py install --home=/foo > running install > Checking .pth file supportin /foo/lib64/python/ > error: can't create or remove files in install directory| > > So the issue is not that your PYTHONPATH doesn't contain > |/lsst/home/rowen/code/sandbox/Linux64/external/matplotlib/1.3.1+1| > (which it does) but that it doesn't contain > |/lsst/home/rowen/code/sandbox/Linux64/external/matplotlib/1.3.1+1/lib/python| > |. > > With matplotlib 1.2.1, we used raw distutils and not setuptools, which > does the same thing without the strict check. And that does allow users > to shoot themselves in the foot, since the check is in fact right when > it says things won't work: > > |> git checkout v1.2.1 > > mkdir ~/foo > > python setup.py install --home=~/foo > ... > > PYTHONPATH=~/foo python > Python2.7.5 (default, Oct8 2013,12:19:40) > [GCC4.8.1 20130603 (Red Hat4.8.1-1)] on linux2 > Type"help","copyright","credits" or "license" for more information. > >>>import matplotlib > Traceback (most recent call last): > File"<stdin>", line1,in <module> > ImportError: No module named matplotlib| > > I think what you really want to use is |--install-lib|, which will > install the matplotlib library directly inside of the given path, which > (if it's also on the `PYTHONPATH`) it will work. Thank you. That did it! For the record, we do actually want the files in <path>/lib/python. So I fixed it by manually adding <path>/lib/python to PYTHONPATH before running the installer. It would help if the error message showed which path was expected to be on the PYTHONPATH, but now that I know I'm happy. -- Russell ------------------------------------------------------------------------------ Shape the Mobile Experience: Free Subscription Software experts and developers: Be at the forefront of tech innovation. Intel(R) Software Adrenaline delivers strategic insight and game-changing conversations that shape the rapidly evolving mobile landscape. Sign up now. http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users