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?

import _tkinter # If this fails your Python may not be configured for Tk

This community is really helpful...

Recommended Answers

All 18 Replies

You probably need at least libtk-devel and libtcl-devel to build with tkinter.

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...

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.

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. [IMG]http://i37.tinypic.com/2mgktc2.jpg[/IMG]. But when i searched for libtcl it shows like this [IMG]http://i33.tinypic.com/orrm7d.jpg[/IMG]. 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...

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.

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.

thanks again gribouillis for ur reply.. when i clicked s/w management i got a window like this.. [IMG]http://i35.tinypic.com/muzgi1.jpg[/IMG]. Whewn i clicked the configure media to my surprise the window i saw was [IMG] http://i37.tinypic.com/2va1glf.jpg[/IMG]. 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!!!

Did you try to click on the "add" button in your last picture ?

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????

When you build python3 form sources, it's installed in /usr/local. There is no risk of conflict.

selec tfull set of sources

As of now it shows [IMG]http://i35.tinypic.com/2sbkihd.jpg[/IMG]. Anyway i'll try later and get back to you.. For this do we need to insert the mandriva DVD??
One more ques. is is there a way to embed images in posts?

I don't know how to solve the mirrorlist problem. Normally you dont need to insert the DVD, but if you insert it I don't think it hurts.
You can attach images to posts.
I soon must go for a few hours, so good luck.

I don't know how to solve the mirrorlist problem. Normally you dont need to insert the DVD, but if you insert it I don't think it hurts.
You can attach images to posts.
I soon must go for a few hours, so good luck.

thanks Gribouillis for your reply.. Even just before i tried and the mirrorlist problem exists.. Can it be the problem with proxy server? Coz i'm accessing the internet through proxy server..
Is there any other way to solve this problem or this is the only way???

Sorry if i offend you by the following words.. But your answers are way too short like yes/no answers.. I've asked how to embed the posts in images? You've said only yes as the answer and my next ques. will obviously be how it can be done? If u hav given a link to the tutorial or if u've explained briefly it'll save time and effort for both of us.. Try to give some explanatory answers. The explanatory answers 'll solve lot of unknown problems(or answers unknown ques. even before it is asked) and these kind of answers will be liked by all avid learners.. waiting for your reply..

If you want a link to a tutorial, here is one. You should browse the mandriva documentation and use google too, I'm a Mandriva user, but I'm not a Mandriva guru.

Now, about attaching pictures to posts, when you click on the big yellow button "Reply to this Thread" below, the editor widget which appears to edit your reply has a paper clip icon named Attachment with which you can attach a picture.

If you want a link to a tutorial, here is one. You should browse the mandriva documentation and use google too, I'm a Mandriva user, but I'm not a Mandriva guru.

Now, about attaching pictures to posts, when you click on the big yellow button "Reply to this Thread" below, the editor widget which appears to edit your reply has a paper clip icon named Attachment with which you can attach a picture.

Sorry dude don't take this in the negative sense(Coz i can see a little disappointment from ur reply). I've been the member of many forums.. In those forums if u want to embed the pics. inline(not as attachment) we have to wrap it around the quotes [IMG]....[/IMG]. But here it's quite different.. I've google around and couldn't find out how in daniweb.That's why i asked..(You could see my previous pics. were posted in this format). Thanks for the info. mate. It'll be really useful for me as the picture says more than words.. If the users send their problems as screen shots it'll be more easy for people like you(geeks) to figure out and find the solution..
One more thing my friend have updated sources in s/w config. in his home connection where it'll be free from proxy hiccups. I'll try this in my home and 'll tell you the result.. Meanwhile if u got some ideas don't forget to tell me.. After all life is all about sharing.. Thanks & regards..

When you build python3 form sources, it's installed in /usr/local. There is no risk of conflict.

Sorry Gribouillis... just now i noticed that i haven't installed python in /usr/local i've installed in the directory itself.. Will that be the cause of the problem?......

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.