Gotchas in user-space matplotlib install?

M

Matt Feinstein

Hi all--

I'm planning to try to do a completely local install of matplotlib (in
Fedora Core 1)-- the system administrator isn't going to stop me-- but
he isn't going to cooperate either. I've got the tarballs for python,
numeric, numarray, matplotlib, ipython, wxpython and freetype-- which
I think covers the various pre-requisites and post-requisites. One
semi-obvious question is where to put the freetype library (the system
version in FC1 is not up to the required level)-- but I can only
wonder what other trouble I'm going to get into. Any advice before I
take the plunge would be appreciated. TIA...


Matt Feinstein
 
J

John Hunter

Matt> Hi all-- I'm planning to try to do a completely local
Matt> install of matplotlib (in Fedora Core 1)-- the system
Matt> administrator isn't going to stop me-- but he isn't going to
Matt> cooperate either. I've got the tarballs for python, numeric,
Matt> numarray, matplotlib, ipython, wxpython and freetype-- which
Matt> I think covers the various pre-requisites and
Matt> post-requisites. One semi-obvious question is where to put
Matt> the freetype library (the system version in FC1 is not up to
Matt> the required level)-- but I can only wonder what other
Matt> trouble I'm going to get into. Any advice before I take the
Matt> plunge would be appreciated. TIA...


If you do a --prefix=~/usr for all 'configure' and 'python setup.py
install' commands, and set your PATH, C_INCLUDE_PATH,
CPLUS_INCLUDE_PATH, LIBRARY_PATH, and LD_LIBRARY_PATH variables
accordingly, and set the MATPLOTLIBDATA environment variable to point
to ~/usr/share/matplotlib, it should work.

When debugging your setup, you might want to run your test
matplotlib/pylab script with
> python myscript.py --verbose-helpful
OR

> python myscript.py --verbose-debug

to get extra information about where matplotlib is looking for things.

JDH
 
M

Matt Feinstein

If you do a --prefix=~/usr for all 'configure' and 'python setup.py
install' commands, and set your PATH, C_INCLUDE_PATH,
CPLUS_INCLUDE_PATH, LIBRARY_PATH, and LD_LIBRARY_PATH variables
accordingly, and set the MATPLOTLIBDATA environment variable to point
to ~/usr/share/matplotlib, it should work.

When debugging your setup, you might want to run your test
matplotlib/pylab script with


to get extra information about where matplotlib is looking for things.

For the record, I persuaded the sysadmin to install current levels of
the tcl, tcl-devel, tk, and tk-devel libraries-- my argument was that
you couldn't get a useful installation of Python without them.

Since I used /usr/people/mrf/python24 for my home Python directory,
there were a few tweaks needed to get the matplotlib installer to find
stuff. To get access to the freetype and Numeric libraries and
what-have-you, adding /usr/people/mrf/python24/lib/python2.4 and
/usr/people/mrf/Numeric-23.8 to the basedir dictionary in setext.py
seemed to work. In addition, I think I had to copy the Numeric include
directory into an additional location. There was also a little
fiddling with PYTHONPATH to insure that the installer found both
numarray and Numeric. Didn't seem to need MATPLOTLIBDATA, but that
would have been my next try.

With a working version of Tcl/Tk, the need for other widget sets
became somewhat academic. For GTK, Fedora Core 1 is apparently so far
behind current levels of GTK that it is pointless to complain. Wx is
still a possibility.

All in all, not actually excruciating-- and now I have a working
version of matplotlib!
Matt Feinstein
 
M

Matt Feinstein

Matt> All in all, not actually excruciating-- and now I have a
Matt> working version of matplotlib! Matt Feinstein

Great! While this is all fresh in your mind, would you be able to add
a wiki entry at
http://www.scipy.org/wikis/topical_software/MatplotlibCookbook

Thanks,

I'm making notes on it now. The only thing that the installation
really stumbled over was some includes-- the Python installation left
me with a '/usr/people/mrf/python24/include' directory, which at the
matplotlib installation had 'python' and 'python2.4' subdirectories--
numarray put its includes into the 'python2.4' subdirectory, while
Numeric put its includes into the 'python' subdirectory. The
matplotlib installer found the numarray includes but not the Numeric
includes-- copying the Numeric includes into the 'python2.4'
subdirectory got the ball rolling again.

Matt Feinstein
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top