Pb with setupext.py - nonstandard installation of python and tk

Hi,

I’ve got difficulties to make a local installation of matplotlib.
I think it’s due to my nonstandard installation of python and tk, which both are in my home.

I’ve seen on the website that , for non standard installation, I should complete the basedir dictionary defined in the setupext.py script.

But for the Tcl/Tk header files, this does not seems to work. Whatever I put in this dictionary, the module.include_dirs corresponding to Tk (line 825 of setupext.py) is always equal to [’/usr/share/include’, ‘/usr/share/include’].

Did I miss something obvious ?

I’m on a linux2 platform and I’'m trying make a local installation of python2.5 + matplotlib 0.91.2 in my home.

Regards,

···


LB

You may want to confirm that the python use use to build matplotlib is the intended one (in your home). As a first try, matplotlib's setup will import Tkinter and grab the include paths from there.

By this I mean when you type:

    python setup.py install

that "python" is the specific python use want to use.

Also check that Tkinter imports without errors in your custom Python.

Cheers,
Mike

BL wrote:

···

    Hi,

I've got difficulties to make a local installation of matplotlib.
I think it's due to my nonstandard installation of python and tk, which both are in my home.

I've seen on the website that , for non standard installation, I should complete the basedir dictionary defined in the setupext.py script.

But for the Tcl/Tk header files, this does not seems to work. Whatever I put in this dictionary, the module.include_dirs corresponding to Tk (line 825 of setupext.py) is always equal to ['/usr/share/include', '/usr/share/include'].

Did I miss something obvious ?

I'm on a linux2 platform and I''m trying make a local installation of python2.5 + matplotlib 0.91.2 in my home.

Regards,
--
LB

------------------------------------------------------------------------

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

------------------------------------------------------------------------

_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

--
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA

Thanks for the reply,

It was not a problem with the specific python I used.

In
fact I have a problem because the Tcl/Tk libraries were in
/usr/share/lib whereas their include files were in /usr/include.
In my case, I used the debian package tkx8.3-dev which does not follow that idiom ( I don’t know why…)
As far
as I understand, matplotlib asks Python for the path of its Tk library,
and guess the path of the include directory from this path by adding
‘…/…/include/tk’ + tk_ver.

I solved my problem by removing this old version of Tk and building a new one.
But
I still think matplotlib should look in the directories given at the
top of setupext.py (or in the setup.cfg file, which would be even
better, I don’t like the fact of having to modify directly setupext.py).

Regards,

···


LB