yowsup Installtionsproblem ImportError

Probleme bei der Installation?
Antworten
mcl024
User
Beiträge: 3
Registriert: Freitag 2. Januar 2015, 16:29

Hallo Zusammen,

ich bin ganz neu hier und hoffentlich an der richtigen Stelle.
Ich probiere nun bereits seit mehreren Tagen diese python whatsapp lib zu installieren https://github.com/tgalal/yowsup

Folgende Fehlermeldung erhalte ich:

Code: Alles auswählen

matthias@matthias-desktop:~/yowsup$ sudo python setup.py install
running install
/usr/local/lib/python2.7/dist-packages/setuptools-10.0.1-py2.7.egg/pkg_resources/__init__.py:2449: PEP440Warning: 'devscripts (2.12.4ubuntu0.1)' is being parsed as a legacy, non PEP 440, version. You may find odd behavior and sort order. In particular it will be sorted as less than 0.0. It is recommend to migrate to PEP 440 compatible versions.
/usr/local/lib/python2.7/dist-packages/setuptools-10.0.1-py2.7.egg/pkg_resources/__init__.py:2449: PEP440Warning: 'python-debian (0.1.21-nmu2ubuntu1)' is being parsed as a legacy, non PEP 440, version. You may find odd behavior and sort order. In particular it will be sorted as less than 0.0. It is recommend to migrate to PEP 440 compatible versions.
/usr/local/lib/python2.7/dist-packages/setuptools-10.0.1-py2.7.egg/pkg_resources/__init__.py:2449: PEP440Warning: 'python-apt (0.8.7ubuntu4)' is being parsed as a legacy, non PEP 440, version. You may find odd behavior and sort order. In particular it will be sorted as less than 0.0. It is recommend to migrate to PEP 440 compatible versions.
/usr/local/lib/python2.7/dist-packages/setuptools-10.0.1-py2.7.egg/pkg_resources/__init__.py:2449: PEP440Warning: 'distribute (0.6.28dev-r0)' is being parsed as a legacy, non PEP 440, version. You may find odd behavior and sort order. In particular it will be sorted as less than 0.0. It is recommend to migrate to PEP 440 compatible versions.
running bdist_egg
running egg_info
writing requirements to yowsup2.egg-info/requires.txt
writing yowsup2.egg-info/PKG-INFO
writing top-level names to yowsup2.egg-info/top_level.txt
writing dependency_links to yowsup2.egg-info/dependency_links.txt
writing requirements to yowsup2.egg-info/requires.txt
writing yowsup2.egg-info/PKG-INFO
writing top-level names to yowsup2.egg-info/top_level.txt
writing dependency_links to yowsup2.egg-info/dependency_links.txt
Traceback (most recent call last):
  File "setup.py", line 38, in <module>
    'Topic :: Software Development :: Libraries :: Python Modules'
  File "/usr/lib/python2.7/distutils/core.py", line 152, in setup
    dist.run_commands()
  File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "build/bdist.linux-i686/egg/setuptools/command/install.py", line 67, in run
  File "build/bdist.linux-i686/egg/setuptools/command/install.py", line 109, in do_egg_install
  File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "build/bdist.linux-i686/egg/setuptools/command/bdist_egg.py", line 152, in run
  File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "build/bdist.linux-i686/egg/setuptools/command/egg_info.py", line 179, in run
  File "build/bdist.linux-i686/egg/setuptools/command/egg_info.py", line 206, in find_sources
  File "build/bdist.linux-i686/egg/setuptools/command/egg_info.py", line 290, in run
  File "build/bdist.linux-i686/egg/setuptools/command/egg_info.py", line 322, in add_defaults
  File "build/bdist.linux-i686/egg/setuptools/command/sdist.py", line 18, in walk_revctrl
  File "build/bdist.linux-i686/egg/pkg_resources/__init__.py", line 2265, in load
    
ImportError: <module 'setuptools.command.sdist' from '/usr/local/lib/python2.7/dist-packages/setuptools-10.0.1-py2.7.egg/setuptools/command/sdist.pyc'> has no '_default_revctrl' attribute
matthias@matthias-desktop:~/yowsup$ 
Sorry ich weiss nicht wie ich am besten Shell Inhalte formatiere!

Vielen Dank!
mcl024
User
Beiträge: 3
Registriert: Freitag 2. Januar 2015, 16:29

Also bin jetzt ein Stück weiter gekommen. Ich habe die Version 9.1 von Setuptools installiert:

Code: Alles auswählen

sudo pip install setuptools==9.1
Jetzt bekomme ich bei nächsten Schritt allerdings folgende Fehlermeldung:

Code: Alles auswählen

matthias@matthias-desktop:~/yowsup$ python yowsup-cli registration --requestcode sms --phone 49159XXXXXXXX --cc 49 --mcc 262 --mnc 07
Traceback (most recent call last):
  File "yowsup-cli", line 6, in <module>
    from yowsup.demos import cli, echoclient, sendclient
  File "/home/matthias/yowsup/yowsup/demos/cli/__init__.py", line 1, in <module>
    from .stack import YowsupCliStack
  File "/home/matthias/yowsup/yowsup/demos/cli/stack.py", line 2, in <module>
    from yowsup.layers.axolotl import YowAxolotlLayer
  File "/home/matthias/yowsup/yowsup/layers/axolotl/__init__.py", line 1, in <module>
    from .layer import YowAxolotlLayer
  File "/home/matthias/yowsup/yowsup/layers/axolotl/layer.py", line 3, in <module>
    from axolotl.util.keyhelper import KeyHelper
  File "build/bdist.linux-x86_64/egg/axolotl/util/keyhelper.py", line 3, in <module>
  File "build/bdist.linux-x86_64/egg/axolotl/identitykeypair.py", line 1, in <module>
  File "build/bdist.linux-x86_64/egg/axolotl/state/storageprotos.py", line 9, in <module>
ImportError: cannot import name symbol_database
matthias@matthias-desktop:~/yowsup$
mcl024
User
Beiträge: 3
Registriert: Freitag 2. Januar 2015, 16:29

Hallo Zusammen,

also der Entwickler von yowsup meinte das etwas mit der Installation von python-protobuf nicht stimmt.

Ich habe es wie folgt installiert

Code: Alles auswählen

sudo apt-get install python-protobuf
Und Python liefert folgendses zur Version

Code: Alles auswählen

matthias@matthias-desktop:~/yowsup$ python
Python 2.7.3 (default, Feb 27 2014, 19:39:10)
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.

            from google import protobuf
            print(protobuf.version)
            3.0.0-alpha-1

            matthias@matthias-desktop:~/yowsup$

Habt ihr noch irgendwelche Ideen was ich da wohl falsch mache?
abschaedler
User
Beiträge: 3
Registriert: Freitag 16. Oktober 2015, 08:14

Hallo zusammen,
auch ich bin nun mehrere Tage dabei das Yowsup zum Laufen zu bringen, und komme auch genau so weit wie mein Vorredner. Vllt hat er es ja schon hinbekommen und kann mir einen Hinweis geben.
Bei mir verhält sich das Ganze nur ein wenig anders. Ich bin zwar auch davon überzeugt, dass es sich dabei um ein Problem mit dem protobuff handelt, jedoch scheint dieses wirklich nicht richtig installiert zu sein.

Code: Alles auswählen

c-server:/Public/Test/yowsup-master # python
Python 2.7.6 (default, Nov 21 2013, 15:55:38) [GCC] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from google import protobuf
>>> print(protobuf.__
protobuf.__class__(         protobuf.__new__(
protobuf.__delattr__(       protobuf.__package__
protobuf.__dict__           protobuf.__path__
protobuf.__doc__            protobuf.__reduce__(
protobuf.__file__           protobuf.__reduce_ex__(
protobuf.__format__(        protobuf.__repr__(
protobuf.__getattribute__(  protobuf.__setattr__(
protobuf.__hash__(          protobuf.__sizeof__(
protobuf.__init__(          protobuf.__str__(
protobuf.__name__           protobuf.__subclasshook__(
>>> print(protobuf.__
Wie man sieht, scheint das protobuf schon implementiert zu sein, allerdings kann ich nichtmal eine Version abfragen. Das Attribut "__version__" gibt es gar nicht.
Ich hab es schon diverse Male in diversen Versionen über den setup.py script installiert, aber bekomme immer das gleiche Verhalten.
Hat jemand eine Idee, was da falsch läuft?
Vielen Dank vorab!
BlackJack

@abschaedler: `google.protobuf.__version__` gibt es nicht. Wie kommst Du denn darauf das das Package nicht richtig installiert ist?
abschaedler
User
Beiträge: 3
Registriert: Freitag 16. Oktober 2015, 08:14

Hallo BlackJack,
ich hatte diesen https://github.com/tgalal/yowsup/issues/503 Forumsbeitrag gelesen und mit diesem Wissen getestet.
Mittlerweile hab ich es tatsächlich gefunden. Asche auf mein Haupt. Ich hätte ein bisschen mehr über meine Plattform erzählen müssen. Das Ganze läuft hier auf einem OpenSUSE 13.1. In den ersten Versuchen hab ich wohl versucht das protobuf über YAST zu installieren, was jedoch nicht funktioniert hat. Irgendwann hab ich es dann über den setup.py-script des Package installiert. Leider hatte ich vergessen, das von YAST installierte Package zu deinstallieren, und schwupps, konnte ich Version auslesen, und auch yowsup läuft auch.

Code: Alles auswählen

Python 2.7.6 (default, Nov 21 2013, 15:55:38) [GCC] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from google import protobuf
>>> print(protobuf.__version__)
3.0.0-alpha-1
>>>
Gruß!
BlackJack

@abschaedler: Brauchst Du wirklich eine Alpha-Version? Das akuellste was `pip` installiert ist Version 2.6.1 und die hat kein `__version__`-Attribut im `protobuf`-Package/Modul.
abschaedler
User
Beiträge: 3
Registriert: Freitag 16. Oktober 2015, 08:14

Keine Ahnung ob ich die brauch. Ich hatte halt diverse Versionen durchgetestet, und bin dann bei dieser hängengeblieben. Ich könnte aber auch nochmal mit der 2.6.1 testen.
Gruß!
Benutzeravatar
Kebap
User
Beiträge: 687
Registriert: Dienstag 15. November 2011, 14:20
Wohnort: Dortmund

Wenn du nicht weißt, ob du sie brauchst, dann nimm lieber die normale. :wink:
MorgenGrauen: 1 Welt, 8 Rassen, 13 Gilden, >250 Abenteuer, >5000 Waffen & Rüstungen,
>7000 NPC, >16000 Räume, >200 freiwillige Programmierer, nur Text, viel Spaß, seit 1992.
Antworten