[archimed@ /usr/home/archimed]$ ccsm
/usr/local/lib/python2.5/site-packages/gtk-2.0/gtk/__init__.py:48: RuntimeWarning: tp_compare didn't return -1 or -2 for exception
from gtk import _gtk
ImportError: could not import pango
ImportError: could not import pango
Info: No sexy-python package found, don't worry it's optional.
Traceback (most recent call last):
File "/usr/local/bin/ccsm", line 39, in <module>
import ccm
File "/usr/local/lib/python2.5/site-packages/ccm/__init__.py", line 1, in <module>
from ccm.Conflicts import *
File "/usr/local/lib/python2.5/site-packages/ccm/Conflicts.py", line 25, in <module>
from ccm.Constants import *
File "/usr/local/lib/python2.5/site-packages/ccm/Constants.py", line 36, in <module>
CurrentScreenNum = gtk.gdk.display_get_default().get_default_screen().get_number()
AttributeError: 'gtk.gdk.DisplayX11' object has no attribute 'get_default_screen'
Python "ImportError: could not import pango"
Имею следующие установленные порты:
py25-gtk-2.12.1
pango-1.18.3
gtk-2.12.3
Вызов ccsm заканчивается ошибками:
Код:
сам скрипт:
Код:
[archimed@ /usr/home/archimed]$ cat /usr/local/bin/ccsm
#!/usr/local/bin/python
# -*- coding: UTF-8 -*-
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# Authors: Quinn Storm (quinn@beryl-project.org)
# Patrick Niklaus (marex@opencompositing.org)
# Copyright (C) 2007 Quinn Storm
import pygtk
pygtk.require('2.0')
import gtk
try:
import sexy
has_sexy = True
except ImportError:
print "Info: No sexy-python package found, don't worry it's optional."
has_sexy = False
if gtk.pygtk_version < (2,10,0):
print "PyGtk 2.10.0 or later required"
raise SystemExit
import compizconfig
ccs = compizconfig
import ccm
screens = ccm.getScreens()
context = ccs.Context(screens)
mainWin = ccm.MainWin(context)
mainWin.show_all()
gtk.main()
#!/usr/local/bin/python
# -*- coding: UTF-8 -*-
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# Authors: Quinn Storm (quinn@beryl-project.org)
# Patrick Niklaus (marex@opencompositing.org)
# Copyright (C) 2007 Quinn Storm
import pygtk
pygtk.require('2.0')
import gtk
try:
import sexy
has_sexy = True
except ImportError:
print "Info: No sexy-python package found, don't worry it's optional."
has_sexy = False
if gtk.pygtk_version < (2,10,0):
print "PyGtk 2.10.0 or later required"
raise SystemExit
import compizconfig
ccs = compizconfig
import ccm
screens = ccm.getScreens()
context = ccs.Context(screens)
mainWin = ccm.MainWin(context)
mainWin.show_all()
gtk.main()
Хочу поинтересоваться, как со всем этим беобразием бороться.
Спасибо за внимание. Тема закрыта.
Цитата:
ImportError: could not import pango
ImportError: could not import pango
ImportError: could not import pango
Ошибка времени выполнения. Т.е. python не мог подгрузить модули pango, юзаемые gtk (причем тут kde???), из за того что он не видел этого модуля, или же не видел установленной библиотеки PyGTK (скорее все же так) :)
Ключевые слова вот:
Цитата:
import pygtk
pygtk.require('2.0')
import gtk
pygtk.require('2.0')
import gtk
Возможно ты перезагрузился, или переконфигурировал python по умолчанию и всё определилось.
В каталоге питона 2.5 должен быть скрипт настройки этой версии по умолчанию.
Цитата: Jail
причем тут kde???
че-то по привычке написал)))
Цитата: Jail
Возможно ты перезагрузился, или переконфигурировал python по умолчанию и всё определилось.
В каталоге питона 2.5 должен быть скрипт настройки этой версии по умолчанию.
Возможно, я переставил и pygtk и gtk, кстати pango обновил, и еще кой-какие либы.