[Ubuntu-BR] Res: Erro com pygtk

Aldo Nogueira aldo.nogueira em gmail.com
Quarta Janeiro 24 00:18:51 UTC 2007


Tá doido, rapá? Usando o root à toa? :)

Na minha máquina, um Edgy 64, deu o seguinte resultado:
aldo em rotnroll:~$ python
Python 2.4.4c1 (#2, Oct 11 2006, 20:00:03)
[GCC 4.1.2 20060928 (prerelease) (Ubuntu 4.1.1-13ubuntu5)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pygtk
>>> help(pygtk)
Help on module pygtk:

NAME
    pygtk

FILE
    /var/lib/python-support/python2.4/pygtk.py

DESCRIPTION
    # -*- Mode: Python; py-indent-offset: 4 -*-
    # pygtk - Python bindings for the GTK+ widget set.
    # Copyright (C) 1998-2002  James Henstridge
    #
    #   pygtk.py: pygtk version selection code.
    #
    # This library is free software; blá blá blá...

Depois, dei um "ls -l" no arquivo acima:
lrwxrwxrwx 1 root root 49 2006-11-08 21:48
/var/lib/python-support/python2.4/pygtk.py ->
/usr/share/python-support/python-gobject/pygtk.py

Em seguida, rodei um "dpkg -S" (acha qual pacote instalou o arquivo
dado) nesse outro arquivo e o resultado foi esse:
python-gobject: /usr/share/python-support/python-gobject/pygtk.py

Tenta reinstalar esse pacote, o python-gobject.

Boa sorte.


Aldo


Em 23/01/07, Silvio Fonseca<silvio.listas em pizzaroot.com.br> escreveu:
> Rafael,
>
> Pode ser um bug mesmo, eu tenho o módulo aqui, porém ele não faz parte de
> nenhum pacote (estou usando o Edgy):
>
> root em gissi-laptop:~# python
> Python 2.4.4c1 (#2, Oct 11 2006, 21:51:02)
> [GCC 4.1.2 20060928 (prerelease) (Ubuntu 4.1.1-13ubuntu5)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import pygtk
> >>> pygtk
> <module 'pygtk' from '/var/lib/python-support/python2.4/pygtk.pyc'>
> >>>
> root em gissi-laptop:~# dpkg -S /var/lib/python-support/python2.4/pygtk.pyc
> dpkg: /var/lib/python-support/python2.4/pygtk.pyc não encontrado.
>
> Alguém tem alguma luz?
>
> Atenciosamente,
>
> Silvio Fonseca
>
>
> > Obrigado pelas respostas Diego, segue abaixo o resultado do que você pediu
> > nas mensagens
> >
> > Rodei
> > for i in `dpkg -L python-gtk2`; do if `test -e $i`;then echo "Ok: $i ";else
> > echo "Faltando: $i";fi; done
> >
> >
> > Retornou
> > Ok: /.
> > Ok: /usr
> > Ok: /usr/share
> > Ok: /usr/share/doc
> > Ok: /usr/share/doc/python-gtk2
> > Ok: /usr/share/doc/python-gtk2/README
> > Ok: /usr/share/doc/python-gtk2/TODO
> > Ok: /usr/share/doc/python-gtk2/changelog.Debian.gz
> > Ok: /usr/share/doc/python-gtk2/README.Debian
> > Ok: /usr/share/doc/python-gtk2/copyright
> > Ok: /usr/share/doc/python-gtk2/changelog.gz
> > Ok: /usr/share/doc/python-gtk2/NEWS.gz
> > Ok: /usr/share/doc/python-gtk2/MAPPING.gz
> > Ok: /usr/share/doc/python-gtk2/THREADS.gz
> >
> >
> > Depois rodei
> >
> > $ sudo aptitude -f install
> > Lendo Lista de Pacotes... Pronto
> > Construindo Árvore de Dependências... Pronto
> > Inicializando estados de pacotes... Pronto
> > Construindo banco de dados de etiquetas... Pronto
> > Nenhum pacote será instalado, atualizado ou removido.
> > 0 pacotes atualizados, 0 novos instalados, 0 a serem removidos e 0 não
> > atualizados. É preciso obter 0B de arquivos. Depois do desempacotamento, 0B
> > serão usados.
> >
> > Então rodei
> >
> > $ sudo aptitude install python-gtk2
> > Lendo Lista de Pacotes... Pronto
> > Construindo Árvore de Dependências... Pronto
> > Lendo informações extendidas de estado
> > Inicializando estados de pacotes... Pronto
> > Construindo banco de dados de etiquetas... Pronto
> > Nenhum pacote será instalado, atualizado ou removido.
> > 0 pacotes atualizados, 0 novos instalados, 0 a serem removidos e 0 não
> > atualizados. É preciso obter 0B de arquivos. Depois do desempacotamento, 0B
> > serão usados. Gravando informações extendidas de estado... Pronto
> >
> > Por ultimo tentei novamente
> >
> > $ sudo gnome-language-selector
> > Traceback (most recent call last):
> >   File "/usr/bin/gnome-language-selector", line 4, in ?
> >     import pygtk
> > ImportError: No module named pygtk
> >
> > E o erro continuou....
> >
> > Rafael Bedendo
> >
> >
> > ----- Mensagem original ----
> > De: Diego Ernesto Pereyra <diesphink em yahoo.com.br>
> > Para: ubuntu-br em lists.ubuntu.com
> > Enviadas: Terça-feira, 23 de Janeiro de 2007 19:10:19
> > Assunto: Re: [Ubuntu-BR] Erro com pygtk
> >
> > Cheque se todos os arquivos do pacote python-gtk2 estão onde deveriam
> > estar, com algo como:
> >
> > for i in `dpkg -L python-gtk2`; do if `test -e $i`;then echo "Ok: $i ";else
> > echo "Faltando: $i";fi; done
> >
> > Cheque que versões do python você tem rodando.
> >
> > Tente um aptitude -f install e aptitude install python-gtk2, o aptitude é
> > mais "inteligente" que o apt-get, e pode propor alguma solução para isso.
> >
> > -- Diego "Sphink" Pereyra
> >
> > Em Tue, 23 Jan 2007 18:54:47 -0300
> >
> > Rafael Bedendo <rafael.bedendo em yahoo.com.br> escreveu:
> > > Obrigado pela resposta Dorneles, fiz e não adiantou continua com o mesmo
> > > erro.
> > >
> > > Dorneles Treméa escreveu:
> > > > Opa Rafael,
> > > >
> > > >> Pessoal estou com um problema aqui e não sei nem por onde começar...
> > > >>
> > > >> Após reinstalar um pacote do python 2.4 não consigo abrir muita coisa,
> > > >> uma delas é o Suporte a Idiomas, abaixo o erro que acontece.
> > > >>
> > > >> $ gnome-language-selector
> > > >> Traceback (most recent call last):
> > > >>   File "/usr/bin/gnome-language-selector", line 4, in ?
> > > >>     import pygtk
> > > >> ImportError: No module named pygtk
> > > >
> > > > tenta aí:
> > > >
> > > > sudo apt-get install python-gtk2 --reinstall
> > > >
> > > > HTH,
> > >
> > > --
> > > ubuntu-br mailing list
> > > ubuntu-br em lists.ubuntu.com
> > > www.ubuntubrasil.org
> > > https://lists.ubuntu.com/mailman/listinfo/ubuntu-br
> >
> > --
> > ubuntu-br mailing list
> > ubuntu-br em lists.ubuntu.com
> > www.ubuntubrasil.org
> > https://lists.ubuntu.com/mailman/listinfo/ubuntu-br
> >
> >
> >
> >
> >
> >
> > __________________________________________________
> > Fale com seus amigos  de graça com o novo Yahoo! Messenger
> > http://br.messenger.yahoo.com/
>
> --
> ubuntu-br mailing list
> ubuntu-br em lists.ubuntu.com
> www.ubuntubrasil.org
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-br
>


More information about the ubuntu-br mailing list