944,031 Members | Top Members by Rank

Ad:
  • Python Discussion Thread
  • Unsolved
  • Views: 1354
  • Python RSS
You are currently viewing page 1 of this multi-page discussion thread
Oct 30th, 2009
0

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

Expand Post »
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?
Python Syntax (Toggle Plain Text)
  1. import _tkinter # If this fails your Python may not be configured for Tk
This community is really helpful...
Reputation Points: 10
Solved Threads: 0
Light Poster
python.noob is offline Offline
37 posts
since Oct 2009
Oct 30th, 2009
0
Re: import error in Tkinter(python 3.1 in mandriva 2009 spring)
You probably need at least libtk-devel and libtcl-devel to build with tkinter.
Reputation Points: 930
Solved Threads: 668
Posting Maven
Gribouillis is offline Offline
2,655 posts
since Jul 2008
Oct 30th, 2009
0

could you elaborate????????

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...
Reputation Points: 10
Solved Threads: 0
Light Poster
python.noob is offline Offline
37 posts
since Oct 2009
Oct 30th, 2009
1
Re: import error in Tkinter(python 3.1 in mandriva 2009 spring)
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.
Reputation Points: 930
Solved Threads: 668
Posting Maven
Gribouillis is offline Offline
2,655 posts
since Jul 2008
Nov 2nd, 2009
0
Re: import error in Tkinter(python 3.1 in mandriva 2009 spring)
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.
Reputation Points: 10
Solved Threads: 0
Light Poster
python.noob is offline Offline
37 posts
since Oct 2009
Nov 2nd, 2009
0
Re: import error in Tkinter(python 3.1 in mandriva 2009 spring)
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.
Reputation Points: 930
Solved Threads: 668
Posting Maven
Gribouillis is offline Offline
2,655 posts
since Jul 2008
Nov 2nd, 2009
0
Re: import error in Tkinter(python 3.1 in mandriva 2009 spring)
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.
Reputation Points: 930
Solved Threads: 668
Posting Maven
Gribouillis is offline Offline
2,655 posts
since Jul 2008
Nov 2nd, 2009
0
Re: import error in Tkinter(python 3.1 in mandriva 2009 spring)
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!!!
Reputation Points: 10
Solved Threads: 0
Light Poster
python.noob is offline Offline
37 posts
since Oct 2009
Nov 2nd, 2009
0
Re: import error in Tkinter(python 3.1 in mandriva 2009 spring)
Did you try to click on the "add" button in your last picture ?
Reputation Points: 930
Solved Threads: 668
Posting Maven
Gribouillis is offline Offline
2,655 posts
since Jul 2008
Nov 2nd, 2009
0
Re: import error in Tkinter(python 3.1 in mandriva 2009 spring)
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????
Reputation Points: 10
Solved Threads: 0
Light Poster
python.noob is offline Offline
37 posts
since Oct 2009

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Python Forum Timeline: passing double char pointer to C function
Next Thread in Python Forum Timeline: loops and parameters?





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC