Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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)


share|improve this question

1 Answer 1

up vote 2 down vote accepted

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

which python

Should return


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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.