Installation of 0.91.2 maintenance + Tkinter developpement packages

Hi
I’m trying to install the 0.91.2 maintenance from the SVN on a Ubuntu 8.04 system.
But I have an error about Tkinter during the checkin of dependancies :

OPTIONAL BACKEND DEPENDENCIES
libpng: 1.2.15beta5
Tkinter: no
* Tkinter present, but header files are not found.
* You may need to install development packages.

For all the other dependancies, there is no problem at all.

When I type python setup.py build, I got this error at the end :

gcc: error trying to exec ‘cc1plus’: execvp: Aucun fichier ou dossier de ce type
gcc: error trying to exec ‘cc1plus’: execvp: Aucun fichier ou dossier de ce type
error: Command “gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I. -I/usr/include/python2.5 -c CXX/cxx_extensions.cxx -o build/temp.linux-i686-2.5/CXX/cxx_extensions.o” failed with exit status 1

I’m guessing that the building error is directly related to the fact that I don’t have the developpement package for tkinter.
The main problem is that I can’t find this package through Synaptic my package manager.
If you have any idea of where this problem comes from, please, I’m listening.

Thanks for the help.
Johan Mazel

It seems you have two unrelated errors here.

The first is that Hardy changed how Tkinter is packaged so that matplotlib can't find it. We do not have a workaround for this on the 0.91.x maintenance branch. You will need to apply this patch to setupext.py:

+@@ -960,6 +960,9 @@ def add_tk_flags(module):
+ if not os.path.exists(tk_inc):
+ tk_inc = os.path.normpath(os.path.join(tk_lib_dir,
+ '../../include'))
++ if not os.path.exists(tk_inc):
++ tk_inc = os.path.normpath(os.path.join(tk_lib_dir,
++ '../../../include/tcl' + tk_ver))

···

+ + if ((not os.path.exists(os.path.join(tk_inc,'tk.h'))) and
+ os.path.exists(os.path.join(tcl_inc,'tk.h'))):
+

We have a better fix on the trunk, but it requires more testing.

The second error typically occurs when g++ is not installed. Try "sudo apt-get install g++".

Cheers,
Mike

Johan Mazel wrote:

Hi
I'm trying to install the 0.91.2 maintenance from the SVN on a Ubuntu 8.04 system.
But I have an error about Tkinter during the checkin of dependancies :

OPTIONAL BACKEND DEPENDENCIES
                libpng: 1.2.15beta5
               Tkinter: no
                        * Tkinter present, but header files are not found.
                        * You may need to install development packages.

For all the other dependancies, there is no problem at all.

When I type python setup.py build, I got this error at the end :

gcc: error trying to exec 'cc1plus': execvp: Aucun fichier ou dossier de ce type
gcc: error trying to exec 'cc1plus': execvp: Aucun fichier ou dossier de ce type
error: Command "gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I. -I/usr/include/python2.5 -c CXX/cxx_extensions.cxx -o build/temp.linux-i686-2.5/CXX/cxx_extensions.o" failed with exit status 1

I'm guessing that the building error is directly related to the fact that I don't have the developpement package for tkinter.
The main problem is that I can't find this package through Synaptic my package manager.
If you have any idea of where this problem comes from, please, I'm listening.

Thanks for the help.
Johan Mazel
------------------------------------------------------------------------

-------------------------------------------------------------------------
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

Hi
Where am I supposed to copy this piece of code in setupext.py ? At the begining ? At the end ?
Thanks for the answer.
Johan Mazel

2008/5/30 Michael Droettboom <mdroe@…86…>:

···

It seems you have two unrelated errors here.

The first is that Hardy changed how Tkinter is packaged so that matplotlib can’t find it. We do not have a workaround for this on the 0.91.x maintenance branch. You will need to apply this patch to setupext.py:

+@@ -960,6 +960,9 @@ def add_tk_flags(module):

  •         if not os.path.exists(tk_inc):
    
  •             tk_inc = os.path.normpath(os.path.join(tk_lib_dir,
    
  •                                       '../../include'))
    

++ if not os.path.exists(tk_inc):

++ tk_inc = os.path.normpath(os.path.join(tk_lib_dir,

++ ‘…/…/…/include/tcl’ + tk_ver))

  •        +             if ((not os.path.exists(os.path.join(tk_inc,'tk.h'))) and
    
  •             os.path.exists(os.path.join(tcl_inc,'tk.h'))):
    

We have a better fix on the trunk, but it requires more testing.

The second error typically occurs when g++ is not installed. Try “sudo apt-get install g++”.

Cheers,

Mike

Johan Mazel wrote:

Hi

I’m trying to install the 0.91.2 maintenance from the SVN on a Ubuntu 8.04 system.

But I have an error about Tkinter during the checkin of dependancies :

OPTIONAL BACKEND DEPENDENCIES

            libpng: 1.2.15beta5

           Tkinter: no

                    * Tkinter present, but header files are not found.

                    * You may need to install development packages.

For all the other dependancies, there is no problem at all.

When I type python setup.py build, I got this error at the end :

gcc: error trying to exec ‘cc1plus’: execvp: Aucun fichier ou dossier de ce type

gcc: error trying to exec ‘cc1plus’: execvp: Aucun fichier ou dossier de ce type

error: Command “gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I. -I/usr/include/python2.5 -c CXX/cxx_extensions.cxx -o build/temp.linux-i686-2.5/CXX/cxx_extensions.o” failed with exit status 1

I’m guessing that the building error is directly related to the fact that I don’t have the developpement package for tkinter.

The main problem is that I can’t find this package through Synaptic my package manager.

If you have any idea of where this problem comes from, please, I’m listening.

Thanks for the help.

Johan Mazel



This SF.net email is sponsored by: Microsoft

Defy all challenges. Microsoft® 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

This is in diff format, so it indicates that it is around line 960. The part to add is this:

           if not os.path.exists(tk_inc):
                tk_inc = os.path.normpath(os.path.join(tk_lib_dir,
                                          '../../../include/tcl' + tk_ver))

right after this:

          if not os.path.exists(tk_inc):
                 tk_inc = os.path.normpath(os.path.join(tk_lib_dir,
                                           '../../include'))

Cheers,
Mike

Johan Mazel wrote:

···

Hi
Where am I supposed to copy this piece of code in setupext.py ? At the begining ? At the end ?
Thanks for the answer.
Johan Mazel

2008/5/30 Michael Droettboom <mdroe@…86… <mailto:mdroe@…86…>>:

    It seems you have two unrelated errors here.

    The first is that Hardy changed how Tkinter is packaged so that
    matplotlib can't find it. We do not have a workaround for this on
    the 0.91.x maintenance branch. You will need to apply this patch
    to setupext.py:

    +@@ -960,6 +960,9 @@ def add_tk_flags(module):
    + if not os.path.exists(tk_inc):
    + tk_inc = os.path.normpath(os.path.join(tk_lib_dir,
    + '../../include'))
    ++ if not os.path.exists(tk_inc):
    ++ tk_inc = os.path.normpath(os.path.join(tk_lib_dir,
    ++ '../../../include/tcl'
    + tk_ver))
    + + if ((not
    os.path.exists(os.path.join(tk_inc,'tk.h'))) and
    + os.path.exists(os.path.join(tcl_inc,'tk.h'))):
    +

    We have a better fix on the trunk, but it requires more testing.

    The second error typically occurs when g++ is not installed. Try
    "sudo apt-get install g++".

    Cheers,
    Mike

    Johan Mazel wrote:

        Hi
        I'm trying to install the 0.91.2 maintenance from the SVN on a
        Ubuntu 8.04 system.
        But I have an error about Tkinter during the checkin of
        dependancies :

        OPTIONAL BACKEND DEPENDENCIES
                       libpng: 1.2.15beta5
                      Tkinter: no
                               * Tkinter present, but header files are
        not found.
                               * You may need to install development
        packages.

        For all the other dependancies, there is no problem at all.

        When I type python setup.py build, I got this error at the end :

        gcc: error trying to exec 'cc1plus': execvp: Aucun fichier ou
        dossier de ce type
        gcc: error trying to exec 'cc1plus': execvp: Aucun fichier ou
        dossier de ce type
        error: Command "gcc -pthread -fno-strict-aliasing -DNDEBUG -g
        -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC
        -I/usr/include/freetype2 -I/usr/local/include -I/usr/include
        -I. -I/usr/include/python2.5 -c CXX/cxx_extensions.cxx -o
        build/temp.linux-i686-2.5/CXX/cxx_extensions.o" failed with
        exit status 1

        I'm guessing that the building error is directly related to
        the fact that I don't have the developpement package for tkinter.
        The main problem is that I can't find this package through
        Synaptic my package manager.
        If you have any idea of where this problem comes from, please,
        I'm listening.

        Thanks for the help.
        Johan Mazel
        ------------------------------------------------------------------------

        -------------------------------------------------------------------------
        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
        <mailto: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

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

Atually, I just installed g++ as you were saying and now, it’s working.
Thanks for the help.
Johan Mazel

2008/5/30 Michael Droettboom <mdroe@…86…>:

···

This is in diff format, so it indicates that it is around line 960. The part to add is this:

      if not os.path.exists(tk_inc):

           tk_inc = os.path.normpath(os.path.join(tk_lib_dir,

                                     '../../../include/tcl' + tk_ver))

right after this:

     if not os.path.exists(tk_inc):

            tk_inc = os.path.normpath(os.path.join(tk_lib_dir,

                                      '../../include'))

Cheers,

Mike

Johan Mazel wrote:

Hi

Where am I supposed to copy this piece of code in setupext.py ? At the begining ? At the end ?

Thanks for the answer.

Johan Mazel

2008/5/30 Michael Droettboom <mdroe@…86… mailto:mdroe@...86...>:

It seems you have two unrelated errors here.



The first is that Hardy changed how Tkinter is packaged so that

matplotlib can't find it.  We do not have a workaround for this on

the 0.91.x maintenance branch.  You will need to apply this patch

to setupext.py:



+@@ -960,6 +960,9 @@ def add_tk_flags(module):

+             if not os.path.exists(tk_inc):

+                 tk_inc = os.path.normpath(os.path.join(tk_lib_dir,

+                                           '../../include'))

++            if not os.path.exists(tk_inc):

++                tk_inc = os.path.normpath(os.path.join(tk_lib_dir,

++                                          '../../../include/tcl'

+ tk_ver))

+            +             if ((not

os.path.exists(os.path.join(tk_inc,'tk.h'))) and

+                 os.path.exists(os.path.join(tcl_inc,'tk.h'))):

+



We have a better fix on the trunk, but it requires more testing.



The second error typically occurs when g++ is not installed.  Try

"sudo apt-get install g++".



Cheers,

Mike



Johan Mazel wrote:



    Hi

    I'm trying to install the 0.91.2 maintenance from the SVN on a

    Ubuntu 8.04 system.

    But I have an error about Tkinter during the checkin of

    dependancies :



    OPTIONAL BACKEND DEPENDENCIES

                   libpng: 1.2.15beta5

                  Tkinter: no

                           * Tkinter present, but header files are

    not found.

                           * You may need to install development

    packages.



    For all the other dependancies, there is no problem at all.



    When I type  python setup.py build, I got this error at the end :



    gcc: error trying to exec 'cc1plus': execvp: Aucun fichier ou

    dossier de ce type

    gcc: error trying to exec 'cc1plus': execvp: Aucun fichier ou

    dossier de ce type

    error: Command "gcc -pthread -fno-strict-aliasing -DNDEBUG -g

    -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC

    -I/usr/include/freetype2 -I/usr/local/include -I/usr/include

    -I. -I/usr/include/python2.5 -c CXX/cxx_extensions.cxx -o

    build/temp.linux-i686-2.5/CXX/cxx_extensions.o" failed with

    exit status 1



    I'm guessing that the building error is directly related to

    the fact that I don't have the developpement package for tkinter.

    The main problem is that I can't find this package through

    Synaptic my package manager.

    If you have any idea of where this problem comes from, please,

    I'm listening.



    Thanks for the help.

    Johan Mazel

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



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

    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/](http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/)

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



    _______________________________________________

    Matplotlib-users mailing list

    Matplotlib-users@lists.sourceforge.net

mailto:Matplotlib-users@lists.sourceforge.net

    [https://lists.sourceforge.net/lists/listinfo/matplotlib-users](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

Michael Droettboom

Science Software Branch

Operations and Engineering Division

Space Telescope Science Institute

Operated by AURA for NASA