Hello! I want to build python with Tk/Tcl by mysel. When writing coomand ¨import Tkinter¨ tehere is an error
import Tkinter Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/Py/lib/python2.5/lib-tk/Tkinter.py", line 38, in <module> import _tkinter # If this fails your Python may not be configured for Tk ImportError: No module named _tkinter
I don understand, how should i buld python for it work correctly. Is there some options in ./configure command for this? -- Best regards, Makarov Alexey
Hello! I want to build python with Tk/Tcl by mysel. When writing coomand ¨import Tkinter¨ tehere is an error
import Tkinter Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/Py/lib/python2.5/lib-tk/Tkinter.py", line 38, in <module> import _tkinter # If this fails your Python may not be configured for Tk ImportError: No module named _tkinter
I don understand, how should I bild python for it work correctly. Is there some options in ./configure command for this? -- Best regards, Makarov Alexey
On Oct 1, 2008, at 8:22 AM, Алексей Макаров wrote:
Hello!
I want to build python with Tk/Tcl by mysel. When writing coomand ¨import Tkinter¨ tehere is an error
import Tkinter Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/Py/lib/python2.5/lib-tk/Tkinter.py", line 38, in <module> import _tkinter # If this fails your Python may not be configured for Tk ImportError: No module named _tkinter
I don understand, how should I bild python for it work correctly. Is there some options in ./configure command for this?
Hello Alexey, In the case of TKinter, you need to make sure that the TCL/TK developer sources are built and installed properly as the first step. Once they are installed, you will need to edit your Python Modules/ Setup file and remove the comment symbols in front of the TKInter entries that apply to what you are building. You can find this by searching for _tkinter once you've opened the Setup file in your editor. HTH, Tim
participants (2)
-
Tim Jones -
Алексей Макаров