SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
keith@disturbed1:~$ python
Python 2.6.6 (r266:84292, Nov 27 2010, 17:27:14)
[GCC 4.5.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import gtk
>>> gtk
<module 'gtk' from '/usr/lib64/python2.6/site-packages/gtk-2.0/gtk/__init__.pyc'>
>>> exit()
keith@disturbed1:~$
keith@disturbed1:~$ python
Python 2.6.6 (r266:84292, Nov 27 2010, 17:27:14)
[GCC 4.5.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import gtk
>>> gtk
<module 'gtk' from '/usr/lib64/python2.6/site-packages/gtk-2.0/gtk/__init__.pyc'>
>>> exit()
keith@disturbed1:~$
I'd check your python installation(s).
I get this:
Code:
bash-4.1# python
Python 2.5.6 (r256:88840, May 30 2011, 20:25:27)
[GCC 4.5.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>> import gtk
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named gtk
>>>
Where do I get the proper python package(s). When I look using sbopkg, there are many, many choices - I have no idea which one to install.
For Slackware 13.1, these are the python (and related) packages:
python-2.6.4
pyrex-0.9.8.5
dbus-python-0.83.1
notify-python-0.1.1
pygtk-2.16.0
pygobject-2.20.0
pycups-1.9.48
pycairo-1.8.8
The python-2.6.4 in in the d series, the rest are in the l series. Probably you won't need to reinstall them all, only python and pygtk. But do check them just in case.
Remove your old python packages using removepkg. If you have your Slackware DVD handy, just change to slackware/d and/or slackware/l and use installpkg. You can also use slackpkg.
How did you install Python 2.5.x?
Did you make install or did you use installpkg?
Quote:
I used sbopkg to get a new python
SlackBuilds.org does not have Python 2.5, there is a Python3, so 2.5.x came from some where else.
Python is an official Slackware package.
sbopkg - for 3rd party user maintained, unofficial, unsupported packages.
slackpkg - for official, supported, and upstream maintained Slackware packages.
removepkg is how you remove packages installed with pkgtools (installpkg, upgradepkg).
You can find out your installed packages by grepping /var/log/packages -
Code:
ls /var/log/packages/ |grep python
MySQL-python-1.2.3-x86_64-1_SBo
dbus-python-0.83.1-x86_64-1
notify-python-0.1.1-x86_64-1
python-2.6.6-x86_64-1
@Diantre Robert.Thompson is using 13.37. Most likely he attempted to install Python 2.5.x to get gmail-backup to work
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.