1

not able to launch my python script. It is complaining that Tkinter module is nowhere to be found....

Uhm, what am I missing?

from Tkinter import *
ImportError: No module named Tkinter


$ sudo port installed | grep py
 py32-tkinter @3.2.2_0 (active)
 python32 @3.2.2_0 (active)

Thanks!

1 Answer 1

2

Make sure you are running the macports version of python and not the OSX version.

which python

Should return

/opt/local/bin/python

If its returning /usr/bin/python instead then your path needs to be adjusted.

export PATH=/opt/local/bin:/opt/local/sbin:$PATH 

You can run the above line from your command prompt to test if it works. If it does work you will need to put it in your ~/.profile for it to persist across sessions.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .