O que faria com que o módulo “gi” estivesse ausente do python?

16

Depois de algumas edições não tão inteligentes da versão padrão do Python no Ubuntu, de 2.7 para 3.2, acabei quebrando todo o meu sistema. Depois que meu computador implodiu e tudo parou de funcionar, tentei reverter minhas alterações (vinculando /usr/bin/python2.7 a / usr / bin / python e alterando a versão padrão em / usr / share / python / debian_defaults de volta para 2.7) mas algumas coisas ainda estão quebradas.

Por exemplo, quando eu digito "import gi" no interpretador python, recebo a seguinte mensagem:

>>> import gi
 Traceback (most recent call last):
 File "<stdin>", line 1, in <module>
 ImportError: No module named gi
>>> 

erro que aparece com alguns programas também (por exemplo: gnome tweak tool). Eu tentei reinstalar o python tanto a partir do centro de software e de fontes, mas o mesmo erro persistir.

Python - a versão agora retorna:

 Python 2.7.2

e também alguns pacotes de software que dependem do python 2.7 estão funcionando (por exemplo, o centro de software), mas algumas coisas ainda estão quebradas. Há algo que eu possa fazer para reinstalar completamente o python 2.7 como a versão padrão?

    
por Colin Dumitru 18.11.2011 / 12:18

6 respostas

15

Eu encontrei três maneiras de fazer isso:

  1. A maneira mais simples:

    sudo apt-get install python3-gi

    ou

  2. Para usuários virtuais - o caminho vext

    pip install vext

    pip install vext.gi

  3. A maneira do desenvolvedor puro em python:

    Instale um monte de coisas para desenvolvedores:

    sudo apt-get install pkg-config libcairo2-dev gcc python3-dev libgirepository1.0-dev

    Instale os pacotes python:

    pip install gobject PyGObject

por Matthew 10.06.2018 / 07:48
7

Uma pequena solução encontrada aqui que funcionou para mim:

sudo nano /usr/bin/gnome-tweak-tool

Alterar #!/usr/bin/env python para #!/usr/bin/python

    
por Pierre de LESPINAY 22.02.2012 / 09:17
6

Execute este comando no terminal:

sudo apt install python3-gi

ou se você precisar do suporte do Python2:

sudo apt install python-gi
    
por Jeremy Bicha 31.07.2016 / 10:38
1

Se você instalou o anaconda e ele se tornou o ambiente python padrão, o módulo gi pode ser instalado via:

conda install -c conda-forge pygobject 

Veja também: link

    
por 04.12.2018 / 03:55
1

No meu caso:

>>> import gi
>>> gi.__file__
'/usr/lib/python2.7/dist-packages/gi/__init__.pyc'

Então, o que você precisa verificar se você tem esse arquivo disponível. Se não estiver, verifique se /usr/lib/python2.7/dist-packages/gi/__init__.py points /usr/share/pyshared/gi/__init__.py . Você deve ter esse arquivo, pois você tem python-gobject 3.0.0-0ubuntu4 (sim, eu tenho a mesma versão).

Se o pacote gi estiver lá, você deve dar uma olhada na sua saída sys.path . Se /usr/lib/python2.7/dist-packages não estiver incluído, adicione-o e tente novamente.

Quando a importação funcionar, basta definir seu PYTHONPATH ou investigar mais sobre o motivo pelo qual o caminho não está definido corretamente.

O problema pendente provavelmente é que o arquivo site.py não é válido por qualquer motivo ou, mais provavelmente, que você não está obtendo o site.py (deve estar em /usr/lib/python2.7/ ). Nesse caso, dê uma olhada aqui para revisar todos os diretórios que o python usa para procurar esse arquivo e verificar se o seu ambiente está correto.

    
por jcollado 18.11.2011 / 16:49
1

Aumentar a verbosidade do intérprete é um longo caminho para a triagem desse problema. Mesmo depois de tudo isso, eu tentei fazer um simples link simbólico do pacote dist-2.7 para o meu pacote dist do usr / local 3.x e fiquei um pouco mais longe, mas não muito.

 sudo ln -s /usr/lib/python2.7/dist-packages/gi/ /usr/local/lib/python3.2/dist-packages

~$ python3
Python 3.2.2+ (default, Feb 16 2012, 19:05:44) 
[GCC 4.6.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import gi
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/local/lib/python3.2/dist-packages/gi/__init__.py", line 23, in 
    from ._gi import _API, Repository
ImportError: /usr/lib/libpyglib-gi-2.0-python2.7.so.0: undefined symbol: _Py_ZeroStruct

Se você puder rastrear o símbolo ausente, poderá resolver esse problema. Aqui está toda a saída de importação detalhada que me levou até aqui. Além disso, isso parece relevante: link , boa sorte.

>>> import gi
# trying gi.cpython-32mu.so
# trying gimodule.cpython-32mu.so
# trying gi.abi3.so
# trying gimodule.abi3.so
# trying gi.so
# trying gimodule.so
# trying gi.py
# trying gi.pyc
# trying /usr/lib/python3.2/gi.cpython-32mu.so
# trying /usr/lib/python3.2/gimodule.cpython-32mu.so
# trying /usr/lib/python3.2/gi.abi3.so
# trying /usr/lib/python3.2/gimodule.abi3.so
# trying /usr/lib/python3.2/gi.so
# trying /usr/lib/python3.2/gimodule.so
# trying /usr/lib/python3.2/gi.py
# trying /usr/lib/python3.2/gi.pyc
# trying /usr/lib/python3.2/plat-linux2/gi.cpython-32mu.so
# trying /usr/lib/python3.2/plat-linux2/gimodule.cpython-32mu.so
# trying /usr/lib/python3.2/plat-linux2/gi.abi3.so
# trying /usr/lib/python3.2/plat-linux2/gimodule.abi3.so
# trying /usr/lib/python3.2/plat-linux2/gi.so
# trying /usr/lib/python3.2/plat-linux2/gimodule.so
# trying /usr/lib/python3.2/plat-linux2/gi.py
# trying /usr/lib/python3.2/plat-linux2/gi.pyc
# trying /usr/lib/python3.2/lib-dynload/gi.cpython-32mu.so
# trying /usr/lib/python3.2/lib-dynload/gimodule.cpython-32mu.so
# trying /usr/lib/python3.2/lib-dynload/gi.abi3.so
# trying /usr/lib/python3.2/lib-dynload/gimodule.abi3.so
# trying /usr/lib/python3.2/lib-dynload/gi.so
# trying /usr/lib/python3.2/lib-dynload/gimodule.so
# trying /usr/lib/python3.2/lib-dynload/gi.py
# trying /usr/lib/python3.2/lib-dynload/gi.pyc
# trying /usr/local/lib/python3.2/dist-packages/gi.cpython-32mu.so
# trying /usr/local/lib/python3.2/dist-packages/gimodule.cpython-32mu.so
# trying /usr/local/lib/python3.2/dist-packages/gi.abi3.so
# trying /usr/local/lib/python3.2/dist-packages/gimodule.abi3.so
# trying /usr/local/lib/python3.2/dist-packages/gi.so
# trying /usr/local/lib/python3.2/dist-packages/gimodule.so
# trying /usr/local/lib/python3.2/dist-packages/gi.py
# trying /usr/local/lib/python3.2/dist-packages/gi.pyc
# trying /usr/lib/python3/dist-packages/gi.cpython-32mu.so
# trying /usr/lib/python3/dist-packages/gimodule.cpython-32mu.so
# trying /usr/lib/python3/dist-packages/gi.abi3.so
# trying /usr/lib/python3/dist-packages/gimodule.abi3.so
# trying /usr/lib/python3/dist-packages/gi.so
# trying /usr/lib/python3/dist-packages/gimodule.so
# trying /usr/lib/python3/dist-packages/gi.py
# trying /usr/lib/python3/dist-packages/gi.pyc
Traceback (most recent call last):
  File "", line 1, in 
ImportError: No module named gi

O caminho de pesquisa nem sequer olha para o caminho python2.7. Aqui está como parece do lado bem-sucedido do python2.7.

>>> import gi
# trying gi.so
# trying gimodule.so
# trying gi.py
# trying gi.pyc
# trying /usr/lib/python2.7/gi.so
# trying /usr/lib/python2.7/gimodule.so
# trying /usr/lib/python2.7/gi.py
# trying /usr/lib/python2.7/gi.pyc
# trying /usr/lib/python2.7/plat-linux2/gi.so
# trying /usr/lib/python2.7/plat-linux2/gimodule.so
# trying /usr/lib/python2.7/plat-linux2/gi.py
# trying /usr/lib/python2.7/plat-linux2/gi.pyc
# trying /usr/lib/python2.7/lib-tk/gi.so
# trying /usr/lib/python2.7/lib-tk/gimodule.so
# trying /usr/lib/python2.7/lib-tk/gi.py
# trying /usr/lib/python2.7/lib-tk/gi.pyc
# trying /usr/lib/python2.7/lib-dynload/gi.so
# trying /usr/lib/python2.7/lib-dynload/gimodule.so
# trying /usr/lib/python2.7/lib-dynload/gi.py
# trying /usr/lib/python2.7/lib-dynload/gi.pyc
# trying /usr/local/lib/python2.7/dist-packages/gi.so
# trying /usr/local/lib/python2.7/dist-packages/gimodule.so
# trying /usr/local/lib/python2.7/dist-packages/gi.py
# trying /usr/local/lib/python2.7/dist-packages/gi.pyc
import gi # directory /usr/lib/python2.7/dist-packages/gi
# trying /usr/lib/python2.7/dist-packages/gi/__init__.so
# trying /usr/lib/python2.7/dist-packages/gi/__init__module.so
# trying /usr/lib/python2.7/dist-packages/gi/__init__.py
# /usr/lib/python2.7/dist-packages/gi/__init__.pyc matches /usr/lib/python2.7/dist-packages/gi/__init__.py
import gi # precompiled from /usr/lib/python2.7/dist-packages/gi/__init__.pyc
# trying __future__.so
# trying __future__module.so
# trying __future__.py
# trying __future__.pyc
# trying /usr/lib/python2.7/__future__.so
# trying /usr/lib/python2.7/__future__module.so
# trying /usr/lib/python2.7/__future__.py
# /usr/lib/python2.7/__future__.pyc matches /usr/lib/python2.7/__future__.py
import __future__ # precompiled from /usr/lib/python2.7/__future__.pyc
# trying /usr/lib/python2.7/dist-packages/gi/_gi.so
dlopen("/usr/lib/python2.7/dist-packages/gi/_gi.so", 2);
import gi._gobject # directory /usr/lib/python2.7/dist-packages/gi/_gobject
# trying /usr/lib/python2.7/dist-packages/gi/_gobject/__init__.so
# trying /usr/lib/python2.7/dist-packages/gi/_gobject/__init__module.so
# trying /usr/lib/python2.7/dist-packages/gi/_gobject/__init__.py
# /usr/lib/python2.7/dist-packages/gi/_gobject/__init__.pyc matches /usr/lib/python2.7/dist-packages/gi/_gobject/__init__.py
import gi._gobject # precompiled from /usr/lib/python2.7/dist-packages/gi/_gobject/__init__.pyc
# trying /usr/lib/python2.7/dist-packages/gi/_gobject/sys.so
# trying /usr/lib/python2.7/dist-packages/gi/_gobject/sysmodule.so
# trying /usr/lib/python2.7/dist-packages/gi/_gobject/sys.py
# trying /usr/lib/python2.7/dist-packages/gi/_gobject/sys.pyc
import gi._glib # directory /usr/lib/python2.7/dist-packages/gi/_glib
# trying /usr/lib/python2.7/dist-packages/gi/_glib/__init__.so
# trying /usr/lib/python2.7/dist-packages/gi/_glib/__init__module.so
# trying /usr/lib/python2.7/dist-packages/gi/_glib/__init__.py
# /usr/lib/python2.7/dist-packages/gi/_glib/__init__.pyc matches /usr/lib/python2.7/dist-packages/gi/_glib/__init__.py
import gi._glib # precompiled from /usr/lib/python2.7/dist-packages/gi/_glib/__init__.pyc
# trying /usr/lib/python2.7/dist-packages/gi/_glib/_glib.so
dlopen("/usr/lib/python2.7/dist-packages/gi/_glib/_glib.so", 2);
import gi._glib._glib # dynamically loaded from /usr/lib/python2.7/dist-packages/gi/_glib/_glib.so
# trying /usr/lib/python2.7/dist-packages/gi/_glib/option.so
# trying /usr/lib/python2.7/dist-packages/gi/_glib/optionmodule.so
# trying /usr/lib/python2.7/dist-packages/gi/_glib/option.py
# /usr/lib/python2.7/dist-packages/gi/_glib/option.pyc matches /usr/lib/python2.7/dist-packages/gi/_glib/option.py
import gi._glib.option # precompiled from /usr/lib/python2.7/dist-packages/gi/_glib/option.pyc
# trying /usr/lib/python2.7/dist-packages/gi/_glib/sys.so
# trying /usr/lib/python2.7/dist-packages/gi/_glib/sysmodule.so
# trying /usr/lib/python2.7/dist-packages/gi/_glib/sys.py
# trying /usr/lib/python2.7/dist-packages/gi/_glib/sys.pyc
# trying /usr/lib/python2.7/dist-packages/gi/_glib/optparse.so
# trying /usr/lib/python2.7/dist-packages/gi/_glib/optparsemodule.so
# trying /usr/lib/python2.7/dist-packages/gi/_glib/optparse.py
# trying /usr/lib/python2.7/dist-packages/gi/_glib/optparse.pyc
# trying optparse.so
# trying optparsemodule.so
# trying optparse.py
# trying optparse.pyc
# trying /usr/lib/python2.7/optparse.so
# trying /usr/lib/python2.7/optparsemodule.so
# trying /usr/lib/python2.7/optparse.py
# /usr/lib/python2.7/optparse.pyc matches /usr/lib/python2.7/optparse.py
import optparse # precompiled from /usr/lib/python2.7/optparse.pyc
# trying textwrap.so
# trying textwrapmodule.so
# trying textwrap.py
# trying textwrap.pyc
# trying /usr/lib/python2.7/textwrap.so
# trying /usr/lib/python2.7/textwrapmodule.so
# trying /usr/lib/python2.7/textwrap.py
# /usr/lib/python2.7/textwrap.pyc matches /usr/lib/python2.7/textwrap.py
import textwrap # precompiled from /usr/lib/python2.7/textwrap.pyc
# trying string.so
# trying stringmodule.so
# trying string.py
# trying string.pyc
# trying /usr/lib/python2.7/string.so
# trying /usr/lib/python2.7/stringmodule.so
# trying /usr/lib/python2.7/string.py
# /usr/lib/python2.7/string.pyc matches /usr/lib/python2.7/string.py
import string # precompiled from /usr/lib/python2.7/string.pyc
import strop # builtin
# trying gettext.so
# trying gettextmodule.so
# trying gettext.py
# trying gettext.pyc
# trying /usr/lib/python2.7/gettext.so
# trying /usr/lib/python2.7/gettextmodule.so
# trying /usr/lib/python2.7/gettext.py
# /usr/lib/python2.7/gettext.pyc matches /usr/lib/python2.7/gettext.py
import gettext # precompiled from /usr/lib/python2.7/gettext.pyc
# trying locale.so
# trying localemodule.so
# trying locale.py
# trying locale.pyc
# trying /usr/lib/python2.7/locale.so
# trying /usr/lib/python2.7/localemodule.so
# trying /usr/lib/python2.7/locale.py
# /usr/lib/python2.7/locale.pyc matches /usr/lib/python2.7/locale.py
import locale # precompiled from /usr/lib/python2.7/locale.pyc
import operator # builtin
# trying functools.so
# trying functoolsmodule.so
# trying functools.py
# trying functools.pyc
# trying /usr/lib/python2.7/functools.so
# trying /usr/lib/python2.7/functoolsmodule.so
# trying /usr/lib/python2.7/functools.py
# /usr/lib/python2.7/functools.pyc matches /usr/lib/python2.7/functools.py
import functools # precompiled from /usr/lib/python2.7/functools.pyc
import _functools # builtin
import _locale # builtin
# trying copy.so
# trying copymodule.so
# trying copy.py
# trying copy.pyc
# trying /usr/lib/python2.7/copy.so
# trying /usr/lib/python2.7/copymodule.so
# trying /usr/lib/python2.7/copy.py
# /usr/lib/python2.7/copy.pyc matches /usr/lib/python2.7/copy.py
import copy # precompiled from /usr/lib/python2.7/copy.pyc
# trying weakref.so
# trying weakrefmodule.so
# trying weakref.py
# trying weakref.pyc
# trying /usr/lib/python2.7/weakref.so
# trying /usr/lib/python2.7/weakrefmodule.so
# trying /usr/lib/python2.7/weakref.py
# /usr/lib/python2.7/weakref.pyc matches /usr/lib/python2.7/weakref.py
import weakref # precompiled from /usr/lib/python2.7/weakref.pyc
# trying org.so
# trying orgmodule.so
# trying org.py
# trying org.pyc
# trying /usr/lib/python2.7/org.so
# trying /usr/lib/python2.7/orgmodule.so
# trying /usr/lib/python2.7/org.py
# trying /usr/lib/python2.7/org.pyc
# trying /usr/lib/python2.7/plat-linux2/org.so
# trying /usr/lib/python2.7/plat-linux2/orgmodule.so
# trying /usr/lib/python2.7/plat-linux2/org.py
# trying /usr/lib/python2.7/plat-linux2/org.pyc
# trying /usr/lib/python2.7/lib-tk/org.so
# trying /usr/lib/python2.7/lib-tk/orgmodule.so
# trying /usr/lib/python2.7/lib-tk/org.py
# trying /usr/lib/python2.7/lib-tk/org.pyc
# trying /usr/lib/python2.7/lib-dynload/org.so
# trying /usr/lib/python2.7/lib-dynload/orgmodule.so
# trying /usr/lib/python2.7/lib-dynload/org.py
# trying /usr/lib/python2.7/lib-dynload/org.pyc
# trying /usr/local/lib/python2.7/dist-packages/org.so
# trying /usr/local/lib/python2.7/dist-packages/orgmodule.so
# trying /usr/local/lib/python2.7/dist-packages/org.py
# trying /usr/local/lib/python2.7/dist-packages/org.pyc
# trying /usr/lib/python2.7/dist-packages/org.so
# trying /usr/lib/python2.7/dist-packages/orgmodule.so
# trying /usr/lib/python2.7/dist-packages/org.py
# trying /usr/lib/python2.7/dist-packages/org.pyc
# trying /usr/lib/python2.7/dist-packages/PIL/org.so
# trying /usr/lib/python2.7/dist-packages/PIL/orgmodule.so
# trying /usr/lib/python2.7/dist-packages/PIL/org.py
# trying /usr/lib/python2.7/dist-packages/PIL/org.pyc
# trying /usr/lib/python2.7/dist-packages/gst-0.10/org.so
# trying /usr/lib/python2.7/dist-packages/gst-0.10/orgmodule.so
# trying /usr/lib/python2.7/dist-packages/gst-0.10/org.py
# trying /usr/lib/python2.7/dist-packages/gst-0.10/org.pyc
# trying /usr/lib/python2.7/dist-packages/gtk-2.0/org.so
# trying /usr/lib/python2.7/dist-packages/gtk-2.0/orgmodule.so
# trying /usr/lib/python2.7/dist-packages/gtk-2.0/org.py
# trying /usr/lib/python2.7/dist-packages/gtk-2.0/org.pyc
# trying /usr/lib/pymodules/python2.7/org.so
# trying /usr/lib/pymodules/python2.7/orgmodule.so
# trying /usr/lib/pymodules/python2.7/org.py
# trying /usr/lib/pymodules/python2.7/org.pyc
# trying /usr/lib/python2.7/dist-packages/ubuntu-sso-client/org.so
# trying /usr/lib/python2.7/dist-packages/ubuntu-sso-client/orgmodule.so
# trying /usr/lib/python2.7/dist-packages/ubuntu-sso-client/org.py
# trying /usr/lib/python2.7/dist-packages/ubuntu-sso-client/org.pyc
# trying /usr/lib/python2.7/dist-packages/ubuntuone-client/org.so
# trying /usr/lib/python2.7/dist-packages/ubuntuone-client/orgmodule.so
# trying /usr/lib/python2.7/dist-packages/ubuntuone-client/org.py
# trying /usr/lib/python2.7/dist-packages/ubuntuone-client/org.pyc
# trying /usr/lib/python2.7/dist-packages/ubuntuone-control-panel/org.so
# trying /usr/lib/python2.7/dist-packages/ubuntuone-control-panel/orgmodule.so
# trying /usr/lib/python2.7/dist-packages/ubuntuone-control-panel/org.py
# trying /usr/lib/python2.7/dist-packages/ubuntuone-control-panel/org.pyc
# trying /usr/lib/python2.7/dist-packages/ubuntuone-couch/org.so
# trying /usr/lib/python2.7/dist-packages/ubuntuone-couch/orgmodule.so
# trying /usr/lib/python2.7/dist-packages/ubuntuone-couch/org.py
# trying /usr/lib/python2.7/dist-packages/ubuntuone-couch/org.pyc
# trying /usr/lib/python2.7/dist-packages/ubuntuone-installer/org.so
# trying /usr/lib/python2.7/dist-packages/ubuntuone-installer/orgmodule.so
# trying /usr/lib/python2.7/dist-packages/ubuntuone-installer/org.py
# trying /usr/lib/python2.7/dist-packages/ubuntuone-installer/org.pyc
# trying /usr/lib/python2.7/dist-packages/ubuntuone-storage-protocol/org.so
# trying /usr/lib/python2.7/dist-packages/ubuntuone-storage-protocol/orgmodule.so
# trying /usr/lib/python2.7/dist-packages/ubuntuone-storage-protocol/org.py
# trying /usr/lib/python2.7/dist-packages/ubuntuone-storage-protocol/org.pyc
# trying struct.so
# trying structmodule.so
# trying struct.py
# trying struct.pyc
# trying /usr/lib/python2.7/struct.so
# trying /usr/lib/python2.7/structmodule.so
# trying /usr/lib/python2.7/struct.py
# /usr/lib/python2.7/struct.pyc matches /usr/lib/python2.7/struct.py
import struct # precompiled from /usr/lib/python2.7/struct.pyc
import _struct # builtin
# trying /usr/lib/python2.7/dist-packages/gi/_glib/gi.so
# trying /usr/lib/python2.7/dist-packages/gi/_glib/gimodule.so
# trying /usr/lib/python2.7/dist-packages/gi/_glib/gi.py
# trying /usr/lib/python2.7/dist-packages/gi/_glib/gi.pyc
# trying /usr/lib/python2.7/dist-packages/gi/_gobject/constants.so
# trying /usr/lib/python2.7/dist-packages/gi/_gobject/constantsmodule.so
# trying /usr/lib/python2.7/dist-packages/gi/_gobject/constants.py
# /usr/lib/python2.7/dist-packages/gi/_gobject/constants.pyc matches /usr/lib/python2.7/dist-packages/gi/_gobject/constants.py
import gi._gobject.constants # precompiled from /usr/lib/python2.7/dist-packages/gi/_gobject/constants.pyc
# trying /usr/lib/python2.7/dist-packages/gi/_gobject/_gobject.so
dlopen("/usr/lib/python2.7/dist-packages/gi/_gobject/_gobject.so", 2);
import gi._gobject._gobject # dynamically loaded from /usr/lib/python2.7/dist-packages/gi/_gobject/_gobject.so
# trying /usr/lib/python2.7/dist-packages/gi/_gobject/propertyhelper.so
# trying /usr/lib/python2.7/dist-packages/gi/_gobject/propertyhelpermodule.so
# trying /usr/lib/python2.7/dist-packages/gi/_gobject/propertyhelper.py
# /usr/lib/python2.7/dist-packages/gi/_gobject/propertyhelper.pyc matches /usr/lib/python2.7/dist-packages/gi/_gobject/propertyhelper.py
import gi._gobject.propertyhelper # precompiled from /usr/lib/python2.7/dist-packages/gi/_gobject/propertyhelper.pyc
# trying /usr/lib/python2.7/dist-packages/gi/_gobject/GTypeWrapper.so
# trying /usr/lib/python2.7/dist-packages/gi/_gobject/GTypeWrappermodule.so
# trying /usr/lib/python2.7/dist-packages/gi/_gobject/GTypeWrapper.py
# trying /usr/lib/python2.7/dist-packages/gi/_gobject/GTypeWrapper.pyc
# trying datetime.so
# trying datetimemodule.so
# trying datetime.py
# trying datetime.pyc
# trying /usr/lib/python2.7/datetime.so
# trying /usr/lib/python2.7/datetimemodule.so
# trying /usr/lib/python2.7/datetime.py
# trying /usr/lib/python2.7/datetime.pyc
# trying /usr/lib/python2.7/plat-linux2/datetime.so
# trying /usr/lib/python2.7/plat-linux2/datetimemodule.so
# trying /usr/lib/python2.7/plat-linux2/datetime.py
# trying /usr/lib/python2.7/plat-linux2/datetime.pyc
# trying /usr/lib/python2.7/lib-tk/datetime.so
# trying /usr/lib/python2.7/lib-tk/datetimemodule.so
# trying /usr/lib/python2.7/lib-tk/datetime.py
# trying /usr/lib/python2.7/lib-tk/datetime.pyc
# trying /usr/lib/python2.7/lib-dynload/datetime.so
dlopen("/usr/lib/python2.7/lib-dynload/datetime.so", 2);
import datetime # dynamically loaded from /usr/lib/python2.7/lib-dynload/datetime.so
# trying /usr/lib/python2.7/dist-packages/gi/_gobject/GTypeWrapper.so
# trying /usr/lib/python2.7/dist-packages/gi/_gobject/GTypeWrappermodule.so
# trying /usr/lib/python2.7/dist-packages/gi/_gobject/GTypeWrapper.py
# trying /usr/lib/python2.7/dist-packages/gi/_gobject/GTypeWrapper.pyc
import gi._gi # dynamically loaded from /usr/lib/python2.7/dist-packages/gi/_gi.so
    
por ppetraki 22.02.2012 / 10:18
0

Dois passos:

  1. Instalar o gobject

    pip install gobject
    
  2. instalar o gi

    pip install gi
    

Seria tudo.

    
por Estuardolh 22.09.2017 / 21:23