import error in Tkinter(python 3.1 in mandriva 2009 spring)

Please support our Python advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Oct 2009
Posts: 37
Reputation: python.noob is an unknown quantity at this point 
Solved Threads: 0
python.noob python.noob is offline Offline
Light Poster

import error in Tkinter(python 3.1 in mandriva 2009 spring)

 
0
  #1
Oct 30th, 2009
Hai guys,
A very good morning to you.Currently i'm using python3 in linux. In windows tkinter is working fine but in mandriva linux spring 2009 it fails to import. Can you please tell me step-by-step on how to fix this issue? In python3.1 home page the
description is not clear or it can't be understood by the beginner. As
i'm a beginner for programming python in linux please help me out. I
want to know what is the thing i missed during installation. I've done
the things correctly as mentioned in the python readme text inside the
python3.1 tarball file.what should i do now?
  1. import _tkinter # If this fails your Python may not be configured for Tk
This community is really helpful...
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 984
Reputation: Gribouillis is a jewel in the rough Gribouillis is a jewel in the rough Gribouillis is a jewel in the rough 
Solved Threads: 222
Gribouillis's Avatar
Gribouillis Gribouillis is offline Offline
Posting Shark
 
0
  #2
Oct 30th, 2009
You probably need at least libtk-devel and libtcl-devel to build with tkinter.
Reply With Quote Quick reply to this message  
Join Date: Oct 2009
Posts: 37
Reputation: python.noob is an unknown quantity at this point 
Solved Threads: 0
python.noob python.noob is offline Offline
Light Poster

could you elaborate????????

 
0
  #3
Oct 30th, 2009
Sorry as i already said i'm new to linux and python. Previously i worked with windows and had no problems. Can you please tell me how to get and install the above mentioned packages.. Your help is much appreciated...
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 984
Reputation: Gribouillis is a jewel in the rough Gribouillis is a jewel in the rough Gribouillis is a jewel in the rough 
Solved Threads: 222
Gribouillis's Avatar
Gribouillis Gribouillis is offline Offline
Posting Shark
 
1
  #4
Oct 30th, 2009
In the applications menu of your desktop panel, you select install software (you need the root password for this). This opens the software manager, which has a search form. Put libtcl in the search form, then check the package you want in the list. Then click on the button at the bottom of the widget to install the package. Repeat with libtk.
Then go to your python source dir and try to rebuild.
Reply With Quote Quick reply to this message  
Join Date: Oct 2009
Posts: 37
Reputation: python.noob is an unknown quantity at this point 
Solved Threads: 0
python.noob python.noob is offline Offline
Light Poster
 
0
  #5
Nov 2nd, 2009
Millions of thanks gribouillis for your reply again. I've searched my install & remove software repository. You've mentioned about two library files. As far as libtk is concerned it's ok. Please see the pic. http://i37.tinypic.com/2mgktc2.jpg. But when i searched for libtcl it shows like this http://i33.tinypic.com/orrm7d.jpg. For this i've inserted the mandriva DVD and installed the rpm for libtcl. But still the status is the same. what should i do now?
Sorry dude if u think that i'm asking silly questions. But i'm really new to linux. It's not like windows where you could double click all the the objects and know the outcome and gain the experience from it. I can't make myself in tune with "first know to how do it and then start working " concept of linux. you know it took me more hours to figure out how to install tarball files.

And one more ques. what is rebuild? Is it like uninstalling and installing again (in windows terminology) or repeating make,make test and configure steps? Please make me clear...
Last edited by python.noob; Nov 2nd, 2009 at 3:22 am.
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 984
Reputation: Gribouillis is a jewel in the rough Gribouillis is a jewel in the rough Gribouillis is a jewel in the rough 
Solved Threads: 222
Gribouillis's Avatar
Gribouillis Gribouillis is offline Offline
Posting Shark
 
0
  #6
Nov 2nd, 2009
I said that you need libtk-devel and libtcl-devel if you want to build with tkinter. If the libraries don't show in the list, you must check that your rpm sources configuration is good: open the mandriva control center (it should be System->Administration->Configure your computer, sorry I have a french localisation, so I don't know the exact name of the menu entries in english). In the Control center, you go to software management and select configure the sources (before doing this, close your package manager). On my system I have the sources HTTP Main, HTTP Main updates HTTP Main32, HTTP Main32 updates HTTP contrib, HTTP contrib updates, HTTP non-free and HTTP non-free updates.
I can't build python 3 with tkinter here because I have a 64 bits processor and I read that it won't work...

You must run the software installer when your internet connection is working . In principle you don"t need the cdrom.
By the way, I'm sure that you never COMPILED python on windows. When mandriva will have a rpm for python 3, it will be as easy to install as it is on windows.
Last edited by Gribouillis; Nov 2nd, 2009 at 3:36 am.
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 984
Reputation: Gribouillis is a jewel in the rough Gribouillis is a jewel in the rough Gribouillis is a jewel in the rough 
Solved Threads: 222
Gribouillis's Avatar
Gribouillis Gribouillis is offline Offline
Posting Shark
 
0
  #7
Nov 2nd, 2009
Also note that it should be available soon, as this page proves. But I don't think you should try to install these packages on 2009 spring. So when 2010 is out, if you upgrade your system, you should have a python 3 with tkinter.
Reply With Quote Quick reply to this message  
Join Date: Oct 2009
Posts: 37
Reputation: python.noob is an unknown quantity at this point 
Solved Threads: 0
python.noob python.noob is offline Offline
Light Poster
 
0
  #8
Nov 2nd, 2009
thanks again gribouillis for ur reply.. when i clicked s/w management i got a window like this.. http://i35.tinypic.com/muzgi1.jpg. Whewn i clicked the configure media to my surprise the window i saw was http://i37.tinypic.com/2va1glf.jpg. I can't see a thing like HTTP free non-free or stuffs like that. I think the thread is getting lenthier . Tell me what to do now?
And one more imp. thing here is when i searched a solution for this problem in google i found the second link to this thread. Such is the power and impact of this community. It's not going to be useful only for me but for trillions of users too. So keep going. Thumbs up bro!!!
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 984
Reputation: Gribouillis is a jewel in the rough Gribouillis is a jewel in the rough Gribouillis is a jewel in the rough 
Solved Threads: 222
Gribouillis's Avatar
Gribouillis Gribouillis is offline Offline
Posting Shark
 
0
  #9
Nov 2nd, 2009
Did you try to click on the "add" button in your last picture ?
Reply With Quote Quick reply to this message  
Join Date: Oct 2009
Posts: 37
Reputation: python.noob is an unknown quantity at this point 
Solved Threads: 0
python.noob python.noob is offline Offline
Light Poster
 
0
  #10
Nov 2nd, 2009
Also note that python mandriva is shipped by default with python2.6. Is there any possibility of conflict between these two libraries? As said by PSF 3.x is not backward compatible with 2.x versions????
Reply With Quote Quick reply to this message  
Reply

Message:



Other Threads in the Python Forum


Views: 558 | Replies: 18
Thread Tools Search this Thread



Tag cloud for Python
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC