[Tutor] Macbook Pro+python programming

Alan Gauld alan.gauld at btinternet.com
Wed Mar 10 02:12:56 CET 2010


"Brett Wunderlich" <brettlea at mac.com> wrote

>> Because I just got a brand new Mac (the one on apple store) and it seems
>> that the build in Python 2.6.1 from darwin is garbage

Thats unlikely, but the configuration may be faulty.

>> dual core and each time I open terminal, then type idle and try to use 
>> IDLE
>> the screen freezes

What happens if you type

$ python /full/path/to/idle.py

Where /full/path./... is the actualm path to idle.py?
Does that work.

> > (something you would never expect with a computer with my
>> specs) and I must force quit the application to be able to continue

I don;t expect that on my old 600MHz G3 iBook - almost 10 years
old and running Python 2.5 and Idle quite happily!

> Python (and idle) on your MacBook Pro should work just fine.
> If it does not, you should work on fixing that, as the Mac OS uses
> Python for various things in the background, especially for 
> installations.

It could well be that Python is working fine and only the idle config is
faulty. It could be as simple as file permissions.
What happens if you use sudo to start idle?

> I would suggest using Disk Utility (in the /Applications/Utilities 
> folder)
> to do a "Verify Disk". If it finds problems, you'll need to boot the
> MacBook Pro from your install disk and use Disk Utility to do
> a "Repair Disk".

I'd be amazed if that was needed.

> If no problems are found then I would start with an Archive and
> Install of the operating system.

And I'd definitely keep that as a last resort!
Its much more likely that you need to setup PYTHONPATH or
even PATH, or set permissions differently.

My first check would be that python itself works ok by just typing
python in the Terminal app and checking you get a working >>>
prompt.
If that works try starting IDLE using the full path and explicitly
calling python as described above.
If that works then check your PATH/PYTHONPATH  settings

-- 
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/ 




More information about the Tutor mailing list