|
From: Michael D. <md...@st...> - 2013-11-21 22:44:36
|
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. Mike On 11/21/2013 04:58 PM, Russell E. Owen wrote: > I'm trying to install matplotlib from source in a specified location on > a RedHat Enterprice Linux Server 6.4 box. The installation fails > claiming that the installation directory is not on the PYTHONPATH, but > that's wrong. See the appended log. > > Any idea how to get this to work? Matplotlib 1.2.1 installs just fine > this way, but unfortunately I can't use it because I need horizontal > histograms (a known bug that was fixed after 1.2.1). > > If I have to go all the way back to maplotlib 1.1.1 then does anyone > know how old numpy has to be? I had hoped to use 1.8.0. > > -- Russell > > python setup.py install > --home=/lsst/home/rowen/code/sandbox/Linux64/external/matplotlib/1.3.1+1 > python setup.py ... > > and your PYTHONPATH environment variable currently contains: > > > '/lsst/DC3/stacks/gcc445-RH6/28nov2011/Linux64/lssteups/6.2.0.0+1/python: > /lsst/DC3/stacks/gcc445-RH6/28nov2011/Linux64/sconsUtils/6.2.0.0+1/python > :/lsst/home/rowen/local/lib/python:/lsst/DC3/stacks/gcc445-RH6/28nov2011/ > eups/1.2.32/python:/lsst/DC3/stacks/gcc445-RH6/28nov2011/Linux64/external > /numpy/1.8.0+1/lib/python:/lsst/home/rowen/code/sandbox/Linux64/external/ > matplotlib/1.3.1+1' > > Here are some of your options for correcting the problem: > > * You can choose a different installation directory, i.e., one that is > on PYTHONPATH or supports .pth files > > > ------------------------------------------------------------------------------ > 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 > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- _ |\/|o _|_ _. _ | | \.__ __|__|_|_ _ _ ._ _ | ||(_| |(_|(/_| |_/|(_)(/_|_ |_|_)(_)(_)| | | http://www.droettboom.com |