小编alo*_*odi的帖子

更新到 14.04 后系统配置打印机损坏

升级到 Ubuntu 14.04 后,gnome 中的对话框 system-config-printer 在从命令行调用时遇到问题:

sudo system-config-printer
Traceback (most recent call last):
  File "/usr/share/system-config-printer/system-config-printer.py", line 72, in <module>
    from gi.repository import GObject # for TYPE_STRING and TYPE_PYOBJECT
  File "/usr/lib/python2.7/dist-packages/gi/__init__.py", line 32, in <module>
    raise ImportError('When using gi.repository you must not import static '
ImportError: When using gi.repository you must not import static modules like "gobject". Please change all occurrences of "import gobject" to "from gi.repository import GObject".
Run Code Online (Sandbox Code Playgroud)

当我尝试更改包中的建议导入时,问题仍然存在,即,

cd /usr/share/system-config-printer
sed -i 's/import gobject/from gi.repository import GObject/g' *.py …
Run Code Online (Sandbox Code Playgroud)

gui python printing gobject

5
推荐指数
1
解决办法
2559
查看次数

标签 统计

gobject ×1

gui ×1

printing ×1

python ×1