Installation issue: python install --home=... fails

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 install
python ...

and your PYTHONPATH environment variable currently contains:


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

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 install --home=/foo
running install
Checking .pth file support in /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 install --home=~/foo
> PYTHONPATH=~/foo python
Python 2.7.5 (default, Oct 8 2013, 12:19:40) [GCC 4.8.1 20130603 (Red Hat 4.8.1-1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import matplotlib
Traceback (most recent call last):
File "<stdin>", line 1, 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



                   -- _ |\/|o _|_ _. _ | | \.__ __|__|_|_ _ _ ._ _ | ||(_| |(_|(/_| |_/|(_)(/_|_ |_|_)(_)(_)| | |