Problem running Tkinter.py in Fatdog 701

For talk and support relating specifically to Puppy derivatives
Post Reply
Message
Author
chiefengineer
Posts: 65
Joined: Mon 25 Mar 2013, 08:48

Problem running Tkinter.py in Fatdog 701

#1 Post by chiefengineer »

I have tk and tcl loaded, devx loaded, kernel headers loaded, python installed.

import Tkinter

fails with ImportError: No module named _tkinter.

Do I need to modify a path somehow? Thanks for any help.

chiefengineer
Posts: 65
Joined: Mon 25 Mar 2013, 08:48

Really dirty workaround

#2 Post by chiefengineer »

No PYTHONPATH tricks worked, since the file didn't
exist...and just porting the file resulted in a bad ELF class
even under 32-bit-compatible sfs...no doubt because Python
itself was 64-bit...but tried it as long as I had clearly entered clusterxxxxland.

I also installed every other single thing in the repository that hinted of Python or Tk, to no avail.

Loaded Puppy with no save file. Downloaded
and installed Tcl, TclX, Tk, and Python 2.7.4.
All of these are txz's from Slackware 14.0.
Loaded 32bit-slacko6.sfs.
Installed the packages...and tkinter imports and works perfectly.
And we met our deadline.

I just have to do this every time or devote my time to choosing
between multiple savefiles which I'm uncertain of since I use
a 50Gb save folder presently.

Wish it were cleaner. I hope somebody shows me how stupid
I am and how easy this could have been.
Last edited by chiefengineer on Thu 17 Sep 2015, 19:16, edited 1 time in total.

jamesbond
Posts: 3433
Joined: Mon 26 Feb 2007, 05:02
Location: The Blue Marble

#3 Post by jamesbond »

Sorry chiefengineer. The built-in python does not support Tkinter, because of its build order (python was built before Tcl/Tk was built). To solve the problem you will have to rebuild python when Tcl/Tk is already installed.

Look at the build recipe in /usr/src/pkgbuild/pkg/python-2.7.6* if you need guide on how to do this. The patches can be found in http://distro.ibiblio.org/fatdog/source/700/patches
Fatdog64 forum links: [url=http://murga-linux.com/puppy/viewtopic.php?t=117546]Latest version[/url] | [url=https://cutt.ly/ke8sn5H]Contributed packages[/url] | [url=https://cutt.ly/se8scrb]ISO builder[/url]

chiefengineer
Posts: 65
Joined: Mon 25 Mar 2013, 08:48

Much appreciation for

#4 Post by chiefengineer »

I am guessing it is always going to be that way or this advice would not be forthcoming so I have started the rebuild...I guess running 32-bit Python is going to break something someday somewhere.

Post Reply