Ich habe https://pypi.python.org/pypi/socketIO-client installiert, um Nachrichten an die volumio API zu senden. Mein Python-Skript:Python SocketIO_client fehlgeschlagen ImportError: Kein Modul mit dem Namen socketIO_client
#!/usr/bin/env python
from socketIO_client import SocketIO, LoggingNamespace
socketIO = SocketIO('localhost', 3000)
socketIO.emit('play')
ich diesen Fehler:
[email protected]:/home/FTP$ sudo python volumio-testSocket.py
Traceback (most recent call last):
File "volumio-testSocket.py", line 3, in <module>
from socketIO_client import SocketIO, LoggingNamespace
ImportError: No module named socketIO_client
Aber mein Skript funktioniert, wenn ich im Terminal laufen:
[email protected]:/home/FTP$ python
Python 2.7.9 (default, Sep 17 2016, 20:26:04)
[GCC 4.9.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from socketIO_client import SocketIO, LoggingNamespace
>>> socketIO = SocketIO('localhost', 3000)
>>> socketIO.emit('play')
jemand mir bitte helfen?
Ich könnte andere Versionen von Python installiert haben, aber das Skript verwendet die gleiche Version von Python. print (sys.version) -> 2.7.9 (Standard, 17.09.2016, 20:26:04) [GCC 4.9.2] – WorkInProgress