setupext bug in matplotlib

Hi,

please let me know if this remark is irrelevant:
  this is the third email mentioning that I still have to add one line in setupext.py in order for matplotlib to be installed without crashing (see below).
For some reason this 'bug' (if it is one?) is present since many versions and has not been solved for me although I have tried to send emails regularly regarding this item. Please let me know if this is normal or if it is just something not set up right for me.

ALSO: I posted a request for help on mplot3d twice, but got no feedback. Any help is welcome!

thanks in advance,
Eric

P.S.: here is what I have to do everytime I wish to install a new version of matplotlib:

# add one line in setupext.py:

         o.tcl_inc="/usr/include/"

# before
         if not os.path.exists(o.tcl_inc):
             print 'cannot find tcl/tk headers. giving up.'
             sys.exit()
     return o

Eric,

I don't know much about setup and installation, but based on your message and a quick look at the relevant part of setupext.py, my guess is that there is something odd about your tk/tcl installation. The code is trying to use methods provided by Tkinter to automatically locate the header files. This code must work for nearly everyone, or else there would be many problem reports like yours.

You might be able to track down the problem by executing the header discovery code in find_tcltk line-by-line from the interpreter, or by adding lots of print statements.

Did you by any chance manually install your tk/tcl header files, as opposed to installing them as part of a *-devel rpm? I am assuming you are running Linux.

Eric

Eric Emsellem wrote:

···

Hi,

please let me know if this remark is irrelevant:
this is the third email mentioning that I still have to add one line in setupext.py in order for matplotlib to be installed without crashing (see below).
For some reason this 'bug' (if it is one?) is present since many versions and has not been solved for me although I have tried to send emails regularly regarding this item. Please let me know if this is normal or if it is just something not set up right for me.

ALSO: I posted a request for help on mplot3d twice, but got no feedback. Any help is welcome!

thanks in advance,
Eric

P.S.: here is what I have to do everytime I wish to install a new version of matplotlib:

# add one line in setupext.py:

        o.tcl_inc="/usr/include/"

# before
        if not os.path.exists(o.tcl_inc):
            print 'cannot find tcl/tk headers. giving up.'
            sys.exit()
    return o

-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

I looked a little bit at this problem before (I have the same issue) and I saw that the test on suse 10 (at least) give a bad answer and so matplotlib can't find the header. This is the result of the test on the suse install in my lab:

In [1]: import Tkinter

In [2]: tk=Tkinter.Tk()

In [3]: tk.getvar('tcl_library')
Out[3]: '/usr/share/tcl/tcl8.4'

In [4]: tk.getvar('tk_library')
Out[4]: u'/usr/share/tcl/tk8.4'

In [5]: tk.getvar('tk_library')
Out[5]: u'/usr/share/tcl/tk8.4'

In [6]: Tkinter.TkVersion
Out[6]: 8.4000000000000004

That explain the problem with setupext.py and like this problem came for the python install on a specific distribution I don't see how that can be generalized. I didn't have this kind of problem with ubuntu but Suse (at least) is famous for some old bug like the one with blas...

Regards,

N.

Eric Firing wrote:

···

Eric,

I don't know much about setup and installation, but based on your message and a quick look at the relevant part of setupext.py, my guess is that there is something odd about your tk/tcl installation. The code is trying to use methods provided by Tkinter to automatically locate the header files. This code must work for nearly everyone, or else there would be many problem reports like yours.

You might be able to track down the problem by executing the header discovery code in find_tcltk line-by-line from the interpreter, or by adding lots of print statements.

Did you by any chance manually install your tk/tcl header files, as opposed to installing them as part of a *-devel rpm? I am assuming you are running Linux.

Eric

Eric Emsellem wrote:

Hi,

please let me know if this remark is irrelevant:
this is the third email mentioning that I still have to add one line in setupext.py in order for matplotlib to be installed without crashing (see below).
For some reason this 'bug' (if it is one?) is present since many versions and has not been solved for me although I have tried to send emails regularly regarding this item. Please let me know if this is normal or if it is just something not set up right for me.

ALSO: I posted a request for help on mplot3d twice, but got no feedback. Any help is welcome!

thanks in advance,
Eric

P.S.: here is what I have to do everytime I wish to install a new version of matplotlib:

# add one line in setupext.py:

        o.tcl_inc="/usr/include/"

# before
        if not os.path.exists(o.tcl_inc):
            print 'cannot find tcl/tk headers. giving up.'
            sys.exit()
    return o

-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users