Go Back   DaemonForums > FreeBSD > FreeBSD General

FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below.

Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1   (View Single Post)  
Old 24th June 2009
whetphish whetphish is offline
BSD Daemon
Join Date: Feb 2009
Location: Bath, England, UK
Posts: 7
Unhappy Python/GTK/Cairo Problems (ImportError: No module named cairo)


Since running an update from 7.1-RELEASE to 7.2-RELEASE and running a portupgrade yesterday I seem to have a problem with a handful of applications and was hoping someone could help me.

So far it seems to be causing problems with alacarte and gramps, but I'm sure there are other programs affected that I haven't come across yet.

Here is the error when I try to run the above programs ...

$ alacarte
Traceback (most recent call last):
  File "/usr/local/bin/alacarte", line 22, in <module>
    from Alacarte.MainWindow import MainWindow
  File "/usr/local/lib/python2.5/site-packages/Alacarte/MainWindow.py", line 19, in <module>
    import gtk, gmenu, gobject, gio
  File "/usr/local/lib/python2.5/site-packages/gtk-2.0/gtk/__init__.py", line 48, in <module>
    from gtk import _gtk
ImportError: No module named cairo

$ gramps
Traceback (most recent call last):
  File "/usr/local/share/gramps/gramps.py", line 54, in <module>
    import gtk
  File "/usr/local/lib/python2.5/site-packages/gtk-2.0/gtk/__init__.py", line 48, in <module>
    from gtk import _gtk
ImportError: No module named cairo
I've tried reinstalling py-cairo (py26-cairo-1.8.4) to no avail, but I did notice that two versions of Python are installed on my machine - 2.5 (python25-2.5.4_1) and 2.6 (python26-2.6.2).

Because the py-cairo version is 2.6 and the above two programs appear to be looking at the 2.5 version of Python, this makes me wonder whether there's some conflict going on and whether I need to set the default Python version somewhere.

In addition to the above, portversion -v reports that the port py25-bsddb-2.5.4_2 needs updating to version 2.6.2_2 but any attempts to do a portupgrade appear to go okay, but the version number stays the same.

So I'm about 90% sure that this is a Python issue. How do I set a 'default' Python? I'm positive that uninstalling 2.5 would be a bad idea as there are bound to still be programs that use it.

As always any help would be greatly appreciated.

Many thanks,
Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
perl module install issues drievisjen OpenBSD Installation and Upgrading 2 3rd September 2009 10:55 PM
Named not starting on NetBSD boot Antimidget NetBSD General 2 27th August 2009 10:57 PM
Installing a kernel module afterwards bram85 FreeBSD Installation and Upgrading 1 20th April 2009 11:38 PM
pam_chauthtok(): error in service module KenJackson FreeBSD Installation and Upgrading 1 26th October 2008 11:24 PM
acessing the root filesystem kernel module! rayden FreeBSD General 1 11th June 2008 06:48 PM

All times are GMT. The time now is 01:27 AM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick