Sie sind nicht angemeldet.

1

04.08.2013, 20:40

Pythonproblem Gobject wird nicht gefunden

Hallo Leute,

irgendwie hab ich ein pythonproblem. Das Gobject wird nicht gefunden. Kann also nicht importiert werden. Pythonupdater hab ich durchlaufen lassen.

Quellcode

1
2
3
4
5
6
7
8
Python 3.2.5 (default, Jul  6 2013, 21:07:26) 
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import gobject
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named gobject
>>> 


dev-lang/python 2.7.5 und 3.2.5-r1
dev-python/pygobject 2.28.6-r53 und 3.8.3
dev-libs/gobject-introspection dev-libs/gobject-introspection-common 1.36.0

lg
boospy
Gentoo Can Do!

Wiki auf: http://deepdoc.at

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »boospy« (09.08.2013, 09:10)


2

05.08.2013, 09:37

Ok

Quellcode

1
2
3
4
5
6
7
8
$ python
Python 2.7.5 (default, Aug  1 2013, 00:06:24) 
[GCC 4.7.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import gobject
>>> print(gobject.__file__)
/usr/lib64/python2.7/site-packages/gobject/__init__.pyc
>>>

Heisst: das kommt via den Teilen in /usr/lib64/python2.7/site-packages/gobject rein.

Und da:

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
$ qfile /usr/lib64/python2.7/site-packages/gobject/__init__.py
dev-python/pygobject (/usr/lib64/python2.7/site-packages/gobject/__init__.py)
$ eix -e pygobject
[I] dev-python/pygobject
     Available versions:  
     (2)    2.28.6-r53
     (3)    3.2.2-r1 (~)3.4.2-r1 (~)3.8.3 [m]**9999[1]
       {+cairo examples libffi test +threads PYTHON_TARGETS="python2_6 python2_7 python3_1 python3_2 python3_3"}
     Installed versions:  2.28.6-r53(2)(00:08:00 08/01/13)(-examples -libffi -test PYTHON_TARGETS="python2_7 -python2_6") 3.8.3(3)(10:31:48 08/01/13)(cairo threads -examples -test PYTHON_TARGETS="python2_7 python3_3 -python2_6 -python3_1 -python3_2")
     Homepage:            http://www.pygtk.org/
     Description:         GLib's GObject library bindings for Python

[1] "gnome" /var/lib/layman/gnome


Interessant ... mach mal ein remerge ... von pygobject bitte.
http://www.dyle.org
IM-Account (Jabber!) sind auf meiner HP ...
There is no place like /home

http://www.gentooforum.de
http://www.gentoofreunde.org

<div>how to annoy a web developer?</span>

3

05.08.2013, 09:48

Hab so alle was es so für Phyton gibt (auch in allen Versionen) neu gebaut. Hat hier leider nicht geholfen.
Gentoo Can Do!

Wiki auf: http://deepdoc.at

4

05.08.2013, 10:56

Du hast da Python 3.2.5 gestartet und nicht Python 2.7 ... kannst du das mit einer Python2 Version nochmals tun?

Welche Python Version ist deine System Einstellung?
http://www.dyle.org
IM-Account (Jabber!) sind auf meiner HP ...
There is no place like /home

http://www.gentooforum.de
http://www.gentoofreunde.org

<div>how to annoy a web developer?</span>

5

05.08.2013, 12:26

Huch, ok mit der 2.7 funktioniert das. Wie jetzt? Gibt es diese Funktion der 3er Version also nicht mehr.
Gehen tut es um Tragtor (Frontend für ffmpeg) Wollt gestern das Ebuild aktualisieren und bekam beim Start der Anwendung die Fehlermeldung. Da ein python2.7 statt python im Header der Startdatei nicht half, war für mich irgenwie klar das es an Pyhton liegen muss. Hmm...

Falls es diese Funktion in der 3er Version nicht mehr gibt kann ich wohl oder übel nur auf 2.7 mit eselect setzten, oder die Startdatei von Tragtor analysieren und umschreiben. Tjo..


lg
boospy
Gentoo Can Do!

Wiki auf: http://deepdoc.at

6

05.08.2013, 12:30

Hm, also geben tut es das schon auch für Python3. Guck mal:

Quellcode

1
2
3
4
5
6
7
8
9
10
11
$ eix -e pygobject
[I] dev-python/pygobject
     Available versions:  
     (2)    2.28.6-r53
     (3)    3.2.2-r1 (~)3.4.2-r1 (~)3.8.3 [m]**9999[1]
       {+cairo examples libffi test +threads PYTHON_TARGETS="python2_6 python2_7 python3_1 python3_2 python3_3"}
     Installed versions:  2.28.6-r53(2)(00:08:00 08/01/13)(-examples -libffi -test PYTHON_TARGETS="python2_7 -python2_6") 3.8.3(3)(10:31:48 08/01/13)(cairo threads -examples -test PYTHON_TARGETS="python2_7 python3_3 -python2_6 -python3_1 -python3_2")
     Homepage:            http://www.pygtk.org/
     Description:         GLib's GObject library bindings for Python

[1] "gnome" /var/lib/layman/gnome


Da hast du mit PYTHON_TARGETS eine ganze Palette ... wie sieht denn das bei dir aus?
http://www.dyle.org
IM-Account (Jabber!) sind auf meiner HP ...
There is no place like /home

http://www.gentooforum.de
http://www.gentoofreunde.org

<div>how to annoy a web developer?</span>

7

05.08.2013, 13:39

Gehen tut es um Tragtor (Frontend für ffmpeg) Wollt gestern das Ebuild aktualisieren und bekam beim Start der Anwendung die Fehlermeldung. Da ein python2.7 statt python im Header der Startdatei nicht half, war für mich irgenwie klar das es an Pyhton liegen muss. Hmm...

Hm, schau mal ob der Workaround aus diesem Ebuld weiterhilft
(ungetestet).

8

05.08.2013, 21:43

sieht so aus, habs wieder auf stable gesetzt.

Quellcode

1
2
3
4
5
6
7
8
[I] dev-python/pygobject
     Available versions:  
	(2)	2.28.6-r53{tbz2}
	(3)	3.2.2-r1{tbz2} ~3.4.2-r1 ~3.8.3{tbz2}
	{{+cairo examples libffi python_targets_python2_6 python_targets_python2_7 python_targets_python3_1 python_targets_python3_2 python_targets_python3_3 test +threads}}
     Installed versions:  2.28.6-r53(2){tbz2}(20:47:01 04.08.2013)(python_targets_python2_7 -examples -libffi -python_targets_python2_6 -test) 3.2.2-r1(3){tbz2}(20:42:42 05.08.2013)(cairo python_targets_python2_7 python_targets_python3_2 threads -examples -python_targets_python2_6 -python_targets_python3_1 -test)
     Homepage:            http://www.pygtk.org/
     Description:         GLib's GObject library bindings for Python


Der Workaround funktioniert. Hatte das vorher schon gesetzt, nur leider direkt im Pythonscript.
Danke Leute.

Aber sollte nicht trotzdem der Import auch mit Version 3 funktionieren? Jetzt unabgesehen von Tragtor.

lg
boospy
Gentoo Can Do!

Wiki auf: http://deepdoc.at

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »boospy« (05.08.2013, 22:32)


9

06.08.2013, 11:12

Nein.

pygobject-2 ist nur für python2 erhältlich. Das verträgt sich nicht mit Python 3. pygobject-3 gibt es für Python2 und Python3. Das geht.

... bloss pygobject-3 sieht ganz anders aus und ist nicht kompatibel. Mach doch mal ein

Quellcode

1
# qlist =dev-python/pygobject-2.28.6-r53 | sort
und

Quellcode

1
# qlist =dev-python/pygobject-3.8.3 | sort
(oder mit den Versionen, die du installiert hast) und zähle die Gemeinsamkeiten ... sind überschaubar.
http://www.dyle.org
IM-Account (Jabber!) sind auf meiner HP ...
There is no place like /home

http://www.gentooforum.de
http://www.gentoofreunde.org

<div>how to annoy a web developer?</span>

10

09.08.2013, 09:10

Ok, ist krass, bin ich sonst nur von Perl gewohnt. Soll so sein. Mit dem Workaround gehts, und das passt so :)

lg
boospy
Gentoo Can Do!

Wiki auf: http://deepdoc.at