Installation yowsup

Begonnen von peter_w, 23 Mai 2016, 23:27:22

Vorheriges Thema - Nächstes Thema

peter_w

Hallo zusammen,

ich versuche yowsup v2.5.0 zu installieren und komme nicht weiter.
Ich habe mehre Python versionen auf dem Raspi3 und das aktuelle Jessie.
Mit Pythen3.5 habe ich es geschafft die Regsistrierung erfolgreich zu beenden.

Also:
python3.5 yowsup-cli registration -c /opt/yowsup-config/yowsup.config -r voice
ist brav gelaufen und ich habe meinen Anruf bekommen.

und auch python3.5 yowsup-cli registration -c /opt/yowsup-config/yowsup.config -R 123456 ist erfolgreich durchgelaufen.

Wenn ich jetzt
python3.5 yowsup-cli demos -c /opt/yowsup-config/yowsup.config -s 4912345... "Das ist ein Test"
aufrufe bekomme ich eine lange Fehlermeldung wo scheinbar _sqlite3 fehlt:

  File "yowsup-cli", line 368, in <module>
    if not parser.process():
  File "yowsup-cli", line 272, in process
    self.startSendClient()
  File "yowsup-cli", line 323, in startSendClient
    not self.args["unmoxie"])
  File "/opt/yowsup-master/yowsup/demos/sendclient/stack.py", line 20, in __init__
    .pushDefaultLayers(encryptionEnabled)\
  File "/opt/yowsup-master/yowsup/stacks/yowstack.py", line 51, in pushDefaultLayers
    defaultLayers = YowStackBuilder.getDefaultLayers(axolotl)
  File "/opt/yowsup-master/yowsup/stacks/yowstack.py", line 73, in getDefaultLayers
    from yowsup.layers.axolotl import AxolotlSendLayer, AxolotlControlLayer, AxolotlReceivelayer
  File "/opt/yowsup-master/yowsup/layers/axolotl/__init__.py", line 1, in <module>
    from .layer_send import AxolotlSendLayer
  File "/opt/yowsup-master/yowsup/layers/axolotl/layer_send.py", line 16, in <module>
    from .layer_base import AxolotlBaseLayer
  File "/opt/yowsup-master/yowsup/layers/axolotl/layer_base.py", line 1, in <module>
    from yowsup.layers.axolotl.store.sqlite.liteaxolotlstore import LiteAxolotlStore
  File "/opt/yowsup-master/yowsup/layers/axolotl/store/sqlite/liteaxolotlstore.py", line 6, in <module>
    from .litesenderkeystore import LiteSenderKeyStore
  File "/opt/yowsup-master/yowsup/layers/axolotl/store/sqlite/litesenderkeystore.py", line 3, in <module>
    import sqlite3
  File "/usr/local/lib/python3.5/sqlite3/__init__.py", line 23, in <module>
    from sqlite3.dbapi2 import *
  File "/usr/local/lib/python3.5/sqlite3/dbapi2.py", line 27, in <module>
    from _sqlite3 import *
ImportError: No module named '_sqlite3'
fhem@raspberrypi4:/opt/yowsup-master$ python3.5 yowsup-cli demos -c /opt/yowsup-config/yowsup.config -s 4915161481262 "Das ist ein Test"File "/usr/local/lib/python3.5/sqlite3/dbapi2.py", line 27, in <module>
ImportError: No module named '_sqlite3'


Also versuche ich das zu installieren: sudo pip install python-sqlite3
Das wird mit der Fehlermeldung:

Could not find a version that satisfies the requirement python-sqlite3 (from versions: )
No matching distribution found for python-sqlite3


beendet.

Da ich bei Python3.5 keine Idee mehr habe, habe ich es mit der Version 2.7 versucht

python yowsup-cli demos -c /opt/yowsup-config/yowsup.config -s 4912345... "Das ist ein Test"

da bekomme ich die Meldung:
Traceback (most recent call last):
  File "yowsup-cli", line 368, in <module>
    if not parser.process():
  File "yowsup-cli", line 272, in process
    self.startSendClient()
  File "yowsup-cli", line 323, in startSendClient
    not self.args["unmoxie"])
  File "/opt/yowsup-master/yowsup/demos/sendclient/stack.py", line 20, in __init__
    .pushDefaultLayers(encryptionEnabled)\
  File "/opt/yowsup-master/yowsup/stacks/yowstack.py", line 51, in pushDefaultLayers
    defaultLayers = YowStackBuilder.getDefaultLayers(axolotl)
  File "/opt/yowsup-master/yowsup/stacks/yowstack.py", line 73, in getDefaultLayers
    from yowsup.layers.axolotl import AxolotlSendLayer, AxolotlControlLayer, AxolotlReceivelayer
  File "/opt/yowsup-master/yowsup/layers/axolotl/__init__.py", line 1, in <module>
    from .layer_send import AxolotlSendLayer
  File "/opt/yowsup-master/yowsup/layers/axolotl/layer_send.py", line 3, in <module>
    from yowsup.layers.axolotl.protocolentities import *
  File "/opt/yowsup-master/yowsup/layers/axolotl/protocolentities/__init__.py", line 3, in <module>
    from .iq_keys_get_result import ResultGetKeysIqProtocolEntity
  File "/opt/yowsup-master/yowsup/layers/axolotl/protocolentities/iq_keys_get_result.py", line 5, in <module>
    from axolotl.identitykey import IdentityKey
  File "build/bdist.linux-armv7l/egg/axolotl/identitykey.py", line 3, in <module>
  File "build/bdist.linux-armv7l/egg/axolotl/ecc/curve.py", line 8, in <module>
ImportError: No module named axolotl_curve25519


Also versuche ich axolotl zu installieren mit: sudo pip2 install python-axolotl

Da laufe ich dann in folgenden Fehler:
curve25519module.c:3:20: fatal error: Python.h: Datei oder Verzeichnis nicht gefunden
     #include <Python.h>
                        ^
    compilation terminated.
    error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1


Also sauber von Fehler umzingelt und ich habe keine Idee woran ich schrauben muss
Release  : 5.8
Raspberry Pi 3
CUL V 1.63 CSM868 HomeMatic (SCC)
HM-CC-RT-DN,HM-LC-Bl1PBU-FM,HM-LC-Sw1PBU-FM,HM-SEC-SCo,HM-WDS10-TH-O

peter_w

Lösung gefunden.

Für Python 2.7 einfach:

sudo apt-get install python-dev

danach geht sudo pip2 install python-axolotl

und dann auch die Kommunikation mit Whatsapp
Release  : 5.8
Raspberry Pi 3
CUL V 1.63 CSM868 HomeMatic (SCC)
HM-CC-RT-DN,HM-LC-Bl1PBU-FM,HM-LC-Sw1PBU-FM,HM-SEC-SCo,HM-WDS10-TH-O