473,714 Members | 3,350 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Python not configured for Tk

3 New Member
I am running Mac osx 10.4 on a Pentium iMac. I have downloaded, unpacked and installed Tcl 8.5a5, Tk 8.5a5, and then Python 2.5.

When I attempt to import Tkinter from a Python shell, I get the following:

>>> import Tkinter
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Frameworks/Python.framewor k/Versions/2.5/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: dlopen(/Library/Frameworks/Python.framewor k/Versions/2.5/lib/python2.5/lib-dynload/_tkinter.so, 2): Library not loaded: /Library/Frameworks/Tcl.framework/Versions/8.4/Tcl
Referenced from: /Library/Frameworks/Python.framewor k/Versions/2.5/lib/python2.5/lib-dynload/_tkinter.so
Reason: image not found

Soooo...... just how DO I "configure" Python for Tk? And what image was not found? How do we find it?

Mar 22 '07 #1
2 6284
6,596 Recognized Expert Expert
I have downloaded, unpacked and installed Tcl 8.5a5, Tk 8.5a5, and then Python 2.5.
There's your problem. All packages must be installed AFTER python is installed. (should be true on the Mac, too)
Mar 23 '07 #2
3 New Member
There's your problem. All packages must be installed AFTER python is installed. (should be true on the Mac, too)
I just reinstalled tcl and tk then rebooted (just in case), opened Python in a terminal window and typed in import Tkinter... same result.
"Traceback. .. import _tkinter # If this fails your Python may not be configured for Tk... Reason: image not found"

Surely there must be some way to configure Python to use tcl/tk. When installing Python perhaps?
Mar 23 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

by: Thomas Nücker | last post by:
Hello! I am using the python dll within a visual-c++ project. In the project i am also handling python scripts. Since i want to use some message-boxes i want to have the opportunity to import modules in the script. Now there is the question: How do i have to configure / compile the python-dll so i can use the tkinter-module or the win32gui module? Is this only a problem of where
by: gaool | last post by:
Hello, I try to launch a Python script on SunOS system but I have this error: """Traceback (most recent call last): File "ihm1_1.py", line 3, in ? from Tkinter import * File "/opt/sfw/lib/python2.3/lib-tk/Tkinter.py", line 38, in ? import _tkinter # If this fails your Python may not be configured for Tk
by: Martyn Quick | last post by:
On my desk here at work I have a Mac G4 running Mac OS X v10.2.8. When I go into a terminal and type "python" up comes a nice python interface and all seems great. However when I type "import Tkinter" I'm greeted by the following error. >>> import Tkinter Traceback (most recent call last): File "<stdin>", line 1, in ? File "/usr/lib/python2.2/lib-tk/Tkinter.py", line 35, in ?
by: J. Jeffrey Close | last post by:
Hi all, I have been trying for some time to build Python 2.4.x from source on OS X 10.4.6. I've found *numerous* postings on various mailing lists and web pages documenting the apparently well-known problems of doing so. Various problems arise either in the ../configure step, with configure arguments that don't work, or in the compile, or in my case in the link step with libtool.
by: Kurt B. Kaiser | last post by:
Patch / Bug Summary ___________________ Patches : 434 open ( +3) / 3430 closed ( +5) / 3864 total ( +8) Bugs : 929 open (+13) / 6285 closed (+12) / 7214 total (+25) RFE : 245 open ( +1) / 240 closed ( +0) / 485 total ( +1) New / Reopened Patches ______________________
by: John Nagle | last post by:
The major complaint I have about Python is that the packages which connect it to other software components all seem to have serious problems. As long as you don't need to talk to anything outside the Python world, you're fine. But once you do, things go downhill. MySQLdb has version and platform compatibility problems. So does M2Crypto. The built-in SSL support is weak. Even basic sockets don't quite work right; the socket module...
by: Jim | last post by:
I compiled Python 2.5 from python.org and I get an error message when I try to import the Tkinter module. Python reports that there is no such module. It says my Python isn't configured for Tkinter. How do I configure it? I'm using GCC 4.1.1 to compile the tarball. Thanks for any help with this. Jim
by: David Cramer | last post by:
If you had an application that you were about to begin development on which you wanted to be cross platform (at least Mac and Windows), would you suggest using c++ and Python? I'm asking because we were originally thinking about doing c# but after attending PyCon this year I'm reconsidering. We are already using Python for the website and I figure a c++ backend w/ a Python GUI may work really well, and would be pretty easy to port. ...
by: Liang Chen | last post by:
Hope you all had a nice weekend. I have a question that I hope someone can help me out. I want to run a Python program that uses Tkinter for the user interface (GUI). The program allows me to type Chinese characters, but neverthelss is unable to show them up on screen. The follow is some of the error message I received after I logged off the program: "Could not write output: <type "exceptions: UnicodeEncodeError'>, 'ascii' codec can't...
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.