Fedora Linux Support Community & Resources Center
  #1  
Old 24th January 2012, 12:22 PM
erlking Offline
Registered User
 
Join Date: Dec 2011
Location: Canterbury Kent
Posts: 21
linuxchrome
Python and Tkinter

Hello All,

Platform: Fedora 16 i686

I hope you guys are doing well. Here is my error: ** IDLE can't import Tkinter. Your Python may not be configured for Tk. **
this is what I get when I run idle from shell. I have been using Linux for a while now; however, Im still learning about it. I did try to uninstall Python2.7 which is the one that comes with Fedora 16 but it has a lot of dependencies that will screw my OS big time. I know Tkinter is installed, cause yesterday I managed to make it run, but I dont remember how now(I was following the instructions of a google search) but the fix was temp as its not working now.
Anyway, there must be a way to make Python search for the tkinter library which is what I think the problem is. Any help will be much appreciated. Any ideas why this bug hasnt been fixed by the Fedora group?

---------- Post added at 12:22 PM ---------- Previous post was at 11:27 AM ----------

Righto, so this is how I fixed it yesterday. I created a file called idle2 on /usr/bin/ directory and copy this function from the web.

#!/usr/bin/python2

from idlelib.PyShell import main
if __name__ == "__main__":
main()

------------------------------ Solved. So, the function must declare something like this(correct me if you think Im saying the wrong answer): from method idlelib.Pyshel import main function, and then the conditional if name == main then call main(). If you know of any other way of have more info, please let me know.
Cheers!
Reply With Quote
  #2  
Old 24th January 2012, 05:39 PM
RupertPupkin's Avatar
RupertPupkin Offline
Registered User
 
Join Date: Nov 2006
Location: Detroit
Posts: 4,619
linuxfedorafirefox
Re: Python and Tkinter

I didn't have to do anything like that in F16 to use Tkinter in Idle. All I did was run idle then do "import Tkinter" and it worked. I'm using Idle from the python-tools package. I have the following Fedora packages installed:

python-2.7.2-5.2.fc16.x86_64
python-tools-2.7.2-5.2.fc16.x86_64
tkinter-2.7.2-5.2.fc16.x86_64
__________________
OS: Fedora 18 x86_64 | CPU: AMD64 3700+ 2.2GHz | RAM: 2GB PC3200 DDR | Disk: 160GB PATA | Video: ATI Radeon 7500 AGP 64MB | Sound: Turtle Beach Santa Cruz CS4630 | Ethernet: Realtek 8110SC
Reply With Quote
Reply

Tags
python, tkinter

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Tkinter with FC6 / python boblux EOL (End Of Life) Versions 2 2nd March 2007 01:27 AM
python: tkinter, wx or gtk the_phet Using Fedora 5 27th June 2006 12:35 PM
HELP PLEASE!!!!! Python + Tkinter.... rolimn Using Fedora 3 21st April 2006 01:19 AM
cant get python and tkinter to agree seltzer Using Fedora 3 2nd April 2006 09:42 PM
Python Tkinter problem. Optimistic Using Fedora 2 29th August 2004 04:39 AM


Current GMT-time: 09:50 (Thursday, 23-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat