SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Oct 2013
    Location
    Colorado
    Posts
    20
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Python3 & tcl/tk update

    On the python.org website it says that python3 has issues with the tcl/tk framework supplied with the operating system (I am running OS X 10.8). The following is taken from the python.org website http://www.python.org/getit/mac/tcltk/:

    Important

    If you are using Python from a python.org 64-bit/32-bit Python installer for Mac OS X 10.6 and later, you should only use IDLE or tkinter with an updated third-party Tcl/Tk 8.5, like ActiveTcl 8.5 installed.


    From the same page further down where it describes the installation process:

    In either case, the dynamically linking occurs when tkinter (Python 3) or Tkinter (Python 2) is first imported (specifically, the internal _tkinter C extension module). By default, the Mac OS X dynamic linker looks first in /Library/Frameworks for Tcl and Tk frameworks with the proper major version. This is the standard location for third-party or built from source frameworks, including the ActiveTcl releases. If frameworks of the proper major version are not found there, the dynamic linker looks for the same version in /System/Library/Frameworks, the location for Apple-supplied frameworks shipped with Mac OS X. (Note, you should normally not modify or delete files in /System/Library.)

    Warning at the download link here http://www.python.org/download/releases/3.3.3/:

    Mac OS X 64-bit/32-bit Installer (3.3.3) for Mac OS X 10.6 and later [2] (sig). [You may need an updated Tcl/Tk install to run IDLE or use Tkinter, see note 2 for instructions.]
    I have downloaded the ActiveTcl 8.5.15.0 and followed the installation instructions, however, IDLE still warns me that it is using version 8.5.9 which is the one that causes the errors/bugs. I looked in the two locations the description says the frameworks should be. The Library/Frameworks/... location has the updated and proper version BUT the /System/Library/Frameworks does NOT and it seems that is where IDLE is looking for the current framework. The installation description says "you should normall not modify or delete files in /System/Library" but that is where the python is pulling the tcl/tk framework from and it is the older version that causes bugs.

    I am trying to learn python, but this certainly puts a damper on things because I am running an unstable framework for the tcl/tk side of things. I was wondering if I could simply copy the files over to the /System/Library... location and change the "Current" link to the newer folder. Is there anything wrong with this idea? Or does anyone have another idea?

  2. #2
    SitePoint Addict
    Join Date
    Aug 2013
    Location
    New Zealand
    Posts
    307
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    Unless you are developing desktop Gui applications I don't know why you need tcl/tk and I prefer wxpython for that anyway.

    Rather than trying to replace system libraries is virtualenv an option?

  3. #3
    SitePoint Addict bronze trophy Hall of Famer's Avatar
    Join Date
    Apr 2013
    Location
    Ithaca
    Posts
    370
    Mentioned
    6 Post(s)
    Tagged
    2 Thread(s)
    umm this is a weird situation. The question is, how likely is the issue gonna be fixed and how long will it take? If you are just learning python theres a good chance that it wont affect you in any way, most likely things will get fixed the time you complete your training sessions. If you are working on a project, especially a complex one, you will have to consider it thoroughly. Only you know what you truly need.

  4. #4
    SitePoint Member
    Join Date
    May 2014
    Location
    Beaverton, OR, USA
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I second the virtualenv suggestion - that lets you use any version of packages independent of what's installed system-wide.

    http://virtualenv.readthedocs.org/en/latest/

    But one bit of advice:
    NEVER copy things about where /System/Library or really /System/anything is involved. I've broken my OSX more than once and had to reinstall. Be afraid. Be very afraid.

    Also worth checking out pyQt, very similar to wxPython. They both do what you can do with Tk, but are more feature-rich.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •