DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD General

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

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 24th June 2009
whetphish whetphish is offline
BSD Daemon
 
Join Date: Feb 2009
Location: Cluj-Napoca, Romania
Posts: 7
Unhappy Python/GTK/Cairo Problems (ImportError: No module named cairo)

Hi,

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

Code:
$ 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,
whetphish.
Reply With Quote
  #2   (View Single Post)  
Old 24th June 2009
roddierod's Avatar
roddierod roddierod is offline
Real Name: Rod Person
VPN Cryptographer
 
Join Date: Apr 2008
Location: Pittsburgh, Pa
Posts: 437
Default

I'm not familiar with these to apps, but check the scripts that start them up.
and see if they start with

Code:
#!/usr/bin/env python2.5
You can change that to
Code:
#!/usr/bin/env python
and it will use your default version of Python so if Python 2.6 is the default version it will use that.

How to upgrade you Python version is in /usr/ports/UPDATING
__________________
"The basic tool for the manipulation of reality is the manipulation of words. If you can control the meaning of words, you can control the people who must use the words." -Philip K. Dick

Last edited by roddierod; 24th June 2009 at 09:23 PM.
Reply With Quote
  #3   (View Single Post)  
Old 24th June 2009
whetphish whetphish is offline
BSD Daemon
 
Join Date: Feb 2009
Location: Cluj-Napoca, Romania
Posts: 7
Default

Many many thanks. Everything is working fine now and I've learnt something too!

Thanks again,
whetphish.
Reply With Quote
Reply

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 07:29 AM.


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