[Edu-sig] Python and Tk on MacOSX

Kent Johnson kent at kentsjohnson.com
Fri Jan 23 23:41:40 EST 2004


OK, I'll take a stab at this. I just ran through this to upgrade from 
2.3.1 to 2.3.3 (under MacOSX 10.2.6) so this should be pretty 
accurate...

- Download and install TclTkAqua from 
http://www.maths.mq.edu.au/~steffen/tcltk/TclTkAqua/

I used the 8.4.4 Batteries Included installer but I only installed 
Tcl and Tk. The plain-vanilla TclTkAqua installer would probably be 
fine as well.

- Download and uncompress the source distribution of Python, the one 
listed as "for Unix or OS X compile"

- If you are building under MacOSX 10.2, you have to make a change to 
/Python-2.3.3/Mac/OSX/Makefile. Uncomment line 14 (remove the #) and 
comment line 16 (add a #)

- In Terminal, enter the commands

./configure --enable-framework
make
sudo make frameworkinstall

This should build /Library/Frameworks/Python.framework and 
/Applications/MacPython. At this point I can

- run python and pythonw from Terminal as usual
- Run PythonIDE (the Mac IDE) by double-clicking the launcher in the 
MacPython folder
- Run IDLE by double-clicking the launcher in the MacPython folder
(The IDLE launcher didn't work for me with 2.3.1. But the command 
'pythonw idle' where idle is in the current directory, will worked 
for me to launch IDLE. Or just look at the idle file and type the two 
lines yourself.)

Note that to run ANY Python GUI on MacOSX, you have to run with 
pythonw or PythonLauncher.

HTH,
Kent

PS to John Zelle - your graphics.py works fine for me on MacOSX.

>Jason  (and other Mac users),
>
>I am very interested in helping folks get IDLE and my graphics 
>package running on the Mac with minimal hassles. I have seen 
>numerous references to the native Tcl/Tk and Python build under Aqua 
>(rather than using XDarwin), but I have not found either:
>1) A binary package made available by someone who has done this to 
>make it easy for others to follow that route
>or
>2) Step-by-Step instructions for getting the build done right.
>
>I have built Python many times on Linux systems, but I have no Mac 
>experience. I do not even really know where to start. Do have 
>pointers to some resources that would allow less Mac-proficient 
>folks to get this done with a minimum of muss and fuss?
>
>By the way, I have also seen some references indicating that the 
>Tk-Aqua port may not yet be ready for primetime. Have you used your 
>setup enough to know how stable it is?
>
>--John
>
>Jason Cunliffe wrote:
>
>>>I have IDLE running on my Macs. I first installed Tcl/TkAqua, then rebuilt
>>>   
>>>
>>Python from source using the MacOSX instructions to do a framework build.
>>
>>I installed IDLE the same way about 6 months ago on Mac OSX 10.2
>>Was fairly painless.
>>
>>- jason
>>
>>
>>_______________________________________________
>>Edu-sig mailing list
>>Edu-sig at python.org
>>http://mail.python.org/mailman/listinfo/edu-sig
>>
>>
>>
>
>--
>    John M. Zelle, Ph.D.   |     Wartburg College   
>   Associate Prof. of CS   |  Dept. Math/CS/Physics 
>john.zelle at wartburg.edu  |     Waverly, Iowa      
>
>
>
>
>_______________________________________________
>Edu-sig mailing list
>Edu-sig at python.org
>http://mail.python.org/mailman/listinfo/edu-sig


-- 
Kent S Johnson
http://www.kentsjohnson.com



More information about the Edu-sig mailing list