Mycroft-core: Python-Skript/s des Installationsprogramms schlagen fehl. -- Kein Modul namens '_ctypes'.

Erstellt am 3. Feb. 2019  ·  10Kommentare  ·  Quelle: MycroftAI/mycroft-core

./dev_setup.sh

Processing triggers for sgml-base (1.29) ...
Setting up docbook-xml (4.5-8) ...
Processing triggers for libc-bin (2.24-11+deb9u3) ...
Processing triggers for systemd (232-25+deb9u8) ...
Processing triggers for sgml-base (1.29) ...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 1603k  100 1603k    0     0  1816k      0 --:--:-- --:--:-- --:--:-- 1816k
Traceback (most recent call last):
  File "<stdin>", line 20649, in <module>
  File "<stdin>", line 197, in main
  File "<stdin>", line 82, in bootstrap
  File "/tmp/tmplfnx9iya/pip.zip/pip/_internal/__init__.py", line 42, in <module>
  File "/tmp/tmplfnx9iya/pip.zip/pip/_internal/cmdoptions.py", line 16, in <module>
  File "/tmp/tmplfnx9iya/pip.zip/pip/_internal/index.py", line 25, in <module>
  File "/tmp/tmplfnx9iya/pip.zip/pip/_internal/download.py", line 39, in <module>
  File "/tmp/tmplfnx9iya/pip.zip/pip/_internal/utils/glibc.py", line 3, in <module>
  File "/usr/local/lib/python3.7/ctypes/__init__.py", line 7, in <module>
    from _ctypes import Union, Structure, Array
ModuleNotFoundError: No module named '_ctypes'
Failed to set up virtualenv for mycroft, exiting setup.

Raspbian-Installation.

Interessant ist auch, dass "Verarbeitung von Triggern für sgml-base" zweimal aufgeführt ist. Seltsam?

Hilfreichster Kommentar

Ich habe die Antwort hier gefunden, die Antwort von Zachary Ware. Ich habe yum install libffi-dev , um es zu reparieren.

Alle 10 Kommentare

unter Raspbian könnte dies dem Installationsskript hinzugefügt werden:

Git ist bereits installiert. Laden Sie also das Git-Repo über git in ein 'cpython'-Unterverzeichnis innerhalb des 'mycroft-core'-Verzeichnisses herunter:

git clone https://github.com/python/cpython.git

Und bauen und kompilieren Sie es:

cd cpython

./configure
make -j 4
sudo make altinstall

cd ..

Wenn git nicht installiert ist (da dieses Skript unter allen Linux läuft), bedenken Sie dies vor git clone :
Von Quelle installieren:
https://git-scm.com/book/de/v2/Getting-Started-Installing-Git

Neues Problem:

Nach dem Kompilieren und Installieren von cpython schlägt das Skript start-mycroft.sh immer noch fehl, wird aber nach dem Fehlschlagen fortgesetzt:

Traceback (most recent call last):
  File "<stdin>", line 20649, in <module>
  File "<stdin>", line 197, in main
  File "<stdin>", line 82, in bootstrap
  File "/tmp/tmpy509z2ho/pip.zip/pip/_internal/__init__.py", line 42, in <module>
  File "/tmp/tmpy509z2ho/pip.zip/pip/_internal/cmdoptions.py", line 16, in <module>
  File "/tmp/tmpy509z2ho/pip.zip/pip/_internal/index.py", line 25, in <module>
  File "/tmp/tmpy509z2ho/pip.zip/pip/_internal/download.py", line 39, in <module>
  File "/tmp/tmpy509z2ho/pip.zip/pip/_internal/utils/glibc.py", line 3, in <module>
  File "/usr/local/lib/python3.7/ctypes/__init__.py", line 7, in <module>
    from _ctypes import Union, Structure, Array
ModuleNotFoundError: No module named '_ctypes'
Failed to set up virtualenv for mycroft, exiting setup.
start-mycroft.sh:  Mycroft command/service launcher
usage: start-mycroft.sh [COMMAND] [restart] [params]

Services COMMANDs:
  all                      runs core services: bus, audio, skills, voice
  debug                    runs core services, then starts the CLI
  audio                    the audio playback service
  bus                      the messagebus service
  skills                   the skill service
  voice                    voice capture service
  enclosure                mark_1 enclosure service

Tool COMMANDs:
  cli                      the Command Line Interface
  unittest                 run mycroft-core unit tests (requires pytest)
  skillstest               run the skill autotests for all skills (requires pytest)

Util COMMANDs:
  audiotest                attempt simple audio validation
  audioaccuracytest        more complex audio validation
  sdkdoc                   generate sdk documentation

Options:
  restart                  (optional) Force the service to restart if running

Examples:
  start-mycroft.sh all
  start-mycroft.sh all restart
  start-mycroft.sh cli
  start-mycroft.sh unittest

Es verhält sich, als wäre es installiert, nachdem es fehlgeschlagen ist.

Beim Versuch, ./start-mycroft.sh debug , schlägt dies mit mehreren Fehlern fehl:

ModuleNotFoundError: No module named '_ctypes'
Failed to set up virtualenv for mycroft, exiting setup.
Starting all mycroft-core services
Initializing...
Starting background service bus
CAUTION: The Mycroft bus is an open websocket with no built-in security
         measures.  You are responsible for protecting the local port
         8181 with a firewall as appropriate.
./start-mycroft.sh: line 140: /var/log/mycroft/bus.log: No such file or directory
Starting background service skills
./start-mycroft.sh: line 140: /var/log/mycroft/skills.log: No such file or directory
Starting background service audio
./start-mycroft.sh: line 140: /var/log/mycroft/audio.log: No such file or directory
Starting background service voice
./start-mycroft.sh: line 140: /var/log/mycroft/voice.log: No such file or directory
Starting background service enclosure
./start-mycroft.sh: line 140: /var/log/mycroft/enclosure.log: No such file or directory
Starting cli
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/runpy.py", line 183, in _run_module_as_main
    mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
  File "/usr/local/lib/python3.7/runpy.py", line 109, in _get_module_details
    __import__(pkg_name)
  File "/home/pi/Mycroft/mycroft-core/mycroft/__init__.py", line 17, in <module>
    from mycroft.api import Api
  File "/home/pi/Mycroft/mycroft-core/mycroft/api/__init__.py", line 18, in <module>
    import requests
ModuleNotFoundError: No module named 'requests'

Ich nehme an, Sie verwenden kein Picroft, was einfach funktioniert.

      Guessing you're not using picroft, which just works.

Richtig. Weil ich auch gerne andere Dinge mit meinem Rpi in einer GUI-Umgebung mache und Picroft nicht richtig lief und kein einfaches USB-Mikrofon erkannte. Fehler können ohne GUI nicht gemeldet werden

Das ist ein wirklich seltsames Thema. Scheint, als ob die Python-Umgebung auf Ihrem Gerät nicht ganz funktioniert oder so? _ctypes ist in der lokalen Python-Standardbibliothek enthalten, die zum Erstellen von mycroft virtualenv verwendet wird.

Können Sie versuchen, den Ordner .venv im mycroft-core-Verzeichnis rm -rf .venv zu löschen und dann das Skript dev_setup.sh erneut auszuführen?

Hallo, da seit 4 Monaten keine Kommunikation zu diesem Thema stattgefunden hat, werde ich es schließen. Wenn dieses Problem weiterhin auftritt, können Sie das Problem erneut öffnen.

Ich habe die Antwort hier gefunden, die Antwort von Zachary Ware. Ich habe yum install libffi-dev , um es zu reparieren.

Ich habe die Antwort hier gefunden, die Antwort von Zachary Ware. Ich habe yum install libffi-dev , um es zu reparieren.

Ja, das hat bei mir funktioniert, ich habe sichergestellt, dass diese Pakete auf meinem Centos 7 installiert sind:

sudo yum install -y zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel expat-devel libffi-dev gcc gcc-c++ zlib libffi-devel

Dann habe ich Python 3.8.1 neu installiert:

wget http://python.org/ftp/python/3.6.8/Python-3.6.8.tar.xz

tar xf Python-3.6.8.tar.xz

cd Python-3.6.8

./configure --prefix=/usr/local --enable-shared LDFLAGS="-Wl,-rpath /usr/local/lib"

make && make altinstall

Dann konnte ich endlich docker-compose installieren:

pip3.8 install docker-compose

Danke @grossshen

War diese Seite hilfreich?
0 / 5 - 0 Bewertungen

Verwandte Themen

InconsolableCellist picture InconsolableCellist  ·  8Kommentare

ChanceNCounter picture ChanceNCounter  ·  8Kommentare

el-tocino picture el-tocino  ·  4Kommentare

Ahmed-Benj picture Ahmed-Benj  ·  7Kommentare

ryanleesipes picture ryanleesipes  ·  4Kommentare