Mac OS X 10.6.6 and MacPyhton 2.6 idle doesn't work

Discussion in 'Python' started by mando, Jun 23, 2011.

  1. mando

    mando Guest

    I've installed MacPython 2.6 under mac os x 2.6 and the IDLE doesn't
    work.
    I post error log. Suggestions?

    Thanks a lot.

    Luca


    23/06/11 19.18.01 Apple80211 framework[211]
    ACInterfaceGetPower called
    with NULL interface
    23/06/11 19.18.01 [0x0-0x1f61f6].org.python.IDLE[2470]
    Traceback (most
    recent call last):
    23/06/11 19.18.01 [0x0-0x1f61f6].org.python.IDLE[2470] File
    "/
    Applications/Python 2.6/IDLE.app/Contents/Resources/idlemain.py",
    line
    30, in <module>
    23/06/11 19.18.01 [0x0-0x1f61f6].org.python.IDLE[2470]
    main()
    23/06/11 19.18.01 [0x0-0x1f61f6].org.python.IDLE[2470] File
    "/
    Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/
    idlelib/
    PyShell.py", line 1382, in main
    23/06/11 19.18.01 [0x0-0x1f61f6].org.python.IDLE[2470]
    root =
    Tk(className="Idle")
    23/06/11 19.18.01 [0x0-0x1f61f6].org.python.IDLE[2470] File
    "/
    Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-
    tk/
    Tkinter.py", line 1645, in __init__
    23/06/11 19.18.01 [0x0-0x1f61f6].org.python.IDLE[2470]
    self._loadtk()
    23/06/11 19.18.01 [0x0-0x1f61f6].org.python.IDLE[2470] File
    "/
    Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-
    tk/
    Tkinter.py", line 1659, in _loadtk
    23/06/11 19.18.01 [0x0-0x1f61f6].org.python.IDLE[2470] %
    (_tkinter.TK_VERSION, tk_version)
    23/06/11 19.18.01 [0x0-0x1f61f6].org.python.IDLE[2470]
    RuntimeError:
    23/06/11 19.18.01 [0x0-0x1f61f6].org.python.IDLE[2470] tk.h
    version
    (8.4) doesn't match libtk.a version (8.5)
    23/06/11 19.18.01 com.apple.launchd.peruser.502[203]
    ([0x0-0x1f61f6].org.python.IDLE[2470]) Exited with exit code: 1
     
    mando, Jun 23, 2011
    #1
    1. Advertising

  2. mando

    Ned Deily Guest

    In article <>,
    wrote:
    > > You'll have to install Tcl yourself. The 2.6 binaries were

    > compiled against a newer version than Apple ships.
    >
    > Does this requirement apply to Python 2.7 or Python 3.2 for the
    > Mac or is this requirement Python 2.6 specific?


    I don't quite understand what's going on there. To the OP: when you say
    MacPython 2.6, from where did you install it or did you build it
    yourself? In OS X 10.6, Apple ships framework versions of both Tcl/Tk
    8.4 and 8.5. Be aware that the 8.5 version shipped by Apple is known to
    be very problematic with IDLE and Tkinter. If building youself, install
    the ActiveState Tcl/Tk 8.5 or stick to 8.4. The most recent python.org
    OS X installer for 2.6 was 2.6.5
    (http://www.python.org/download/releases/2.6.5/) and should work just
    fine with the Apple-supplied Tcl/Tk 8.4 or with ActiveState Tcl/Tk 8.4.
    More info here:

    http://www.python.org/download/mac/tcltk/

    --
    Ned Deily,
     
    Ned Deily, Jun 23, 2011
    #2
    1. Advertising

  3. mando

    mando Guest

    mando, Jun 24, 2011
    #3
  4. mando

    Ned Deily Guest

    In article
    <>,
    mando <> wrote:

    > I took MacPython 2.6 from here:
    >
    > http://www.python.org/ftp/python/2.6.6/python-2.6.6-macosx10.3.dmg
    >
    >
    > Also I downloaded Tcl/Tk from here
    > http://www.kyngchaos.com/software/frameworks
    > to using the gis software Qgis....
    >
    > May be here the issue?


    I can't reproduce the problem and I really don't see how installing that
    Tcl/Tk framework could cause the problem by itself. The version of Tcl
    and Tk to dynamically load is added to the executable at link time when
    the installer is being built. It should look something like this:

    $ cd /Library/Frameworks/Python.framework/Versions/2.6
    $ cd ./lib/python2.6/lib-dynload/
    $ otool -L _tkinter.so
    _tkinter.so (architecture ppc):
    /Library/Frameworks/Tcl.framework/Versions/8.4/Tcl (compatibility
    version 8.4.0, current version 8.4.19)
    /Library/Frameworks/Tk.framework/Versions/8.4/Tk (compatibility
    version 8.4.0, current version 8.4.19)
    /usr/lib/libmx.A.dylib (compatibility version 1.0.0, current version
    47.1.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
    version 88.3.10)
    _tkinter.so (architecture i386):
    /Library/Frameworks/Tcl.framework/Versions/8.4/Tcl (compatibility
    version 8.4.0, current version 8.4.19)
    /Library/Frameworks/Tk.framework/Versions/8.4/Tk (compatibility
    version 8.4.0, current version 8.4.19)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
    version 88.3.10)

    Note the absolute path to the framework. If that version of the
    framework does not exist at that location, the dynamic loader falls back
    to the OS X standard location /System/Library/Frameworks ...

    If you've only installed that one extra Tcl/Tk version, things should
    look something like this:

    $ ls -l /Library/Frameworks/Tcl.framework/Versions/
    total 8
    drwxr-xr-x 5 root admin 272 Jul 27 2010 8.5/
    lrwxr-xr-x 1 root admin 3 Jun 24 13:31 Current@ -> 8.5
    $ ls -l /Library/Frameworks/Tk.framework/Versions/
    total 8
    drwxr-xr-x 5 root admin 272 Jul 27 2010 8.5/
    lrwxr-xr-x 1 sysadminold wheel 3 Jun 24 13:31 Current@ -> 8.5
    $ ls -l /System/Library/Frameworks/Tk.framework/Versions/
    total 8
    drwxr-xr-x 5 root wheel 340 Mar 17 18:27 8.4/
    drwxr-xr-x 5 root wheel 340 Mar 17 18:27 8.5/
    lrwxr-xr-x 1 root wheel 3 Nov 7 2010 Current@ -> 8.5
    $ ls -l /System/Library/Frameworks/Tcl.framework/Versions/
    total 8
    drwxr-xr-x 5 root wheel 374 Mar 17 18:27 8.4/
    drwxr-xr-x 5 root wheel 374 Mar 17 18:27 8.5/
    lrwxr-xr-x 1 root wheel 3 Nov 7 2010 Current@ -> 8.5

    If not, something's wrong. It's especially odd that you would see a
    problem with IDLE.app since it is not influenced by shell initialization
    steps. Do you have something set in ~/.MacOSX/environment.plist ?
    Also, try launching that idle from a shell:

    $ /usr/local/bin/idle2.6

    --
    Ned Deily,
     
    Ned Deily, Jun 24, 2011
    #4
  5. mando

    mando Guest

    This is the result of the test you suggested to me. What do you think?

    Last login: Mon Jun 27 19:35:21 on ttys000
    host220-186-dynamic:~ luca$ cd /Library/Frameworks/Python.framework/
    Versions/2.6
    host220-186-dynamic:2.6 luca$ cd ./lib/python2.6/lib-dynload/
    host220-186-dynamic:lib-dynload luca$ otool -L _tkinter.so
    _tkinter.so (architecture ppc):
    /Library/Frameworks/Tcl.framework/Versions/8.5/Tcl (compatibility
    version 8.5.0, current version 8.5.1)
    /Library/Frameworks/Tk.framework/Versions/8.5/Tk (compatibility
    version 8.5.0, current version 8.5.1)
    /usr/lib/libmx.A.dylib (compatibility version 1.0.0, current version
    47.1.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
    version 88.3.9)
    _tkinter.so (architecture i386):
    /Library/Frameworks/Tcl.framework/Versions/8.5/Tcl (compatibility
    version 8.5.0, current version 8.5.1)
    /Library/Frameworks/Tk.framework/Versions/8.5/Tk (compatibility
    version 8.5.0, current version 8.5.1)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
    version 88.3.9)
    host220-186-dynamic:lib-dynload luca$ ls -l /Library/Frameworks/
    Tcl.framework/Versions/
    total 8
    drwxr-xr-x 8 root admin 272 23 Giu 15:57 8.5
    lrwxr-xr-x 1 root admin 3 23 Giu 15:57 Current -> 8.5
    host220-186-dynamic:lib-dynload luca$ ls -l /Library/Frameworks/
    Tk.framework/Versions/
    total 8
    drwxr-xr-x 8 root admin 272 23 Giu 15:57 8.5
    lrwxr-xr-x 1 503 wheel 3 23 Giu 15:57 Current -> 8.5
    host220-186-dynamic:lib-dynload luca$ ls -l /System/Library/Frameworks/
    Tk.framework/Versions/
    total 8
    drwxr-xr-x 10 root wheel 340 23 Giu 21:53 8.4
    drwxr-xr-x 10 root wheel 340 23 Giu 21:53 8.5
    lrwxr-xr-x 1 root wheel 3 12 Ott 2010 Current -> 8.5
    host220-186-dynamic:lib-dynload luca$ ls -l /System/Library/Frameworks/
    Tcl.framework/Versions/
    total 8
    drwxr-xr-x 11 root wheel 374 23 Giu 21:53 8.4
    drwxr-xr-x 11 root wheel 374 23 Giu 21:53 8.5
    lrwxr-xr-x 1 root wheel 3 12 Ott 2010 Current -> 8.5
    host220-186-dynamic:lib-dynload luca$ sudo /usr/local/bin/idle2.6
    Password:
    Traceback (most recent call last):
    File "/usr/local/bin/idle2.6", line 5, in <module>
    main()
    File "/Library/Frameworks/Python.framework/Versions/2.6/lib/
    python2.6/idlelib/PyShell.py", line 1382, in main
    root = Tk(className="Idle")
    File "/Library/Frameworks/Python.framework/Versions/2.6/lib/
    python2.6/lib-tk/Tkinter.py", line 1645, in __init__
    self._loadtk()
    File "/Library/Frameworks/Python.framework/Versions/2.6/lib/
    python2.6/lib-tk/Tkinter.py", line 1659, in _loadtk
    % (_tkinter.TK_VERSION, tk_version)
    RuntimeError: tk.h version (8.4) doesn't match libtk.a version (8.5)
     
    mando, Jun 28, 2011
    #5
  6. mando

    Ned Deily Guest

    In article
    <>,
    mando <> wrote:
    > This is the result of the test you suggested to me. What do you think?
    >
    > Last login: Mon Jun 27 19:35:21 on ttys000
    > host220-186-dynamic:~ luca$ cd /Library/Frameworks/Python.framework/
    > Versions/2.6
    > host220-186-dynamic:2.6 luca$ cd ./lib/python2.6/lib-dynload/
    > host220-186-dynamic:lib-dynload luca$ otool -L _tkinter.so
    > _tkinter.so (architecture ppc):
    > /Library/Frameworks/Tcl.framework/Versions/8.5/Tcl (compatibility
    > version 8.5.0, current version 8.5.1)
    > /Library/Frameworks/Tk.framework/Versions/8.5/Tk (compatibility
    > version 8.5.0, current version 8.5.1)
    > /usr/lib/libmx.A.dylib (compatibility version 1.0.0, current version
    > 47.1.0)
    > /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
    > version 88.3.9)
    > _tkinter.so (architecture i386):
    > /Library/Frameworks/Tcl.framework/Versions/8.5/Tcl (compatibility
    > version 8.5.0, current version 8.5.1)
    > /Library/Frameworks/Tk.framework/Versions/8.5/Tk (compatibility
    > version 8.5.0, current version 8.5.1)
    > /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
    > version 88.3.9)


    I'm not sure where you got that version of Python from but the output
    from otool is definitely not that of a _tkinter.so from the standard
    python.org 2.6.6 installer and it explains the results you are seeing.
    If you want to stick with the python.org Python 2.6, I suggest you
    download the latest installer from here:
    http://python.org/download/releases/2.6.6/
    and re-install.

    Good luck.

    --
    Ned Deily,
     
    Ned Deily, Jun 28, 2011
    #6
  7. mando

    mando Guest

    Why my post aren't here?
     
    mando, Jun 28, 2011
    #7
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Dominique
    Replies:
    3
    Views:
    274
    Dominique
    Sep 14, 2007
  2. leonardo

    idle doesn't work

    leonardo, Mar 10, 2013, in forum: Python
    Replies:
    0
    Views:
    131
    leonardo
    Mar 10, 2013
  3. Åukasz Posadowski

    Re: idle doesn't work

    Åukasz Posadowski, Mar 10, 2013, in forum: Python
    Replies:
    0
    Views:
    125
    Åukasz Posadowski
    Mar 10, 2013
  4. leonardo

    idle doesn't work

    leonardo, Mar 10, 2013, in forum: Python
    Replies:
    0
    Views:
    133
    leonardo
    Mar 10, 2013
  5. leonardo

    idle (GUI)doesn't work…

    leonardo, Mar 10, 2013, in forum: Python
    Replies:
    0
    Views:
    138
    leonardo
    Mar 10, 2013
Loading...

Share This Page