./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 Install.
Também é interessante notar que "Processando gatilhos para sgml-base" está listado duas vezes. Ímpar?
Parece ser uma solução alternativa aqui. Mas isso ainda é um bug.
https://stackoverflow.com/questions/27022373/python3-importerror-no-module-named-ctypes-when-using-value-from-module-mul
no Raspbian, isso pode ser adicionado ao script de instalação:
Git já está instalado. Portanto, baixe o repositório git em um subdiretório 'cpython' dentro do diretório 'mycroft-core' via git:
git clone https://github.com/python/cpython.git
E construir e compilar:
cd cpython
./configure
make -j 4
sudo make altinstall
cd ..
Se o git não estiver instalado (já que este script é executado em todo o Linux), considere isso antes de git clone
:
Instale da fonte:
https://git-scm.com/book/en/v2/Getting-Started-Installing-Git
Novo problema:
Depois de compilar e instalar cpython
, o script start-mycroft.sh
ainda falha, mas continua após a falha:
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
Ele age como se estivesse instalado, após falhar.
Ao tentar usar ./start-mycroft.sh debug
, ele falha com vários erros:
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'
Supondo que você não está usando o picroft, o que simplesmente funciona.
Guessing you're not using picroft, which just works.
Correto. Porque também gosto de fazer outras coisas com meu Rpi em um ambiente de GUI, e o Picroft não funcionou corretamente e não detectou um microfone USB básico. Não é possível relatar bugs sem uma GUI
Este é um problema realmente estranho. Parece que o ambiente Python em seu dispositivo não está funcionando bem ou algo assim? _ctypes está incluído na biblioteca padrão python local que é usada para criar o mycroft virtualenv.
Você pode tentar excluir a pasta .venv
no diretório mycroft-core rm -rf .venv
e, em seguida, executar novamente o script dev_setup.sh?
Olá, como não houve comunicação sobre esse problema por 4 meses, vou encerrá-lo. Se você ainda estiver enfrentando esse problema, sinta-se à vontade para reabri-lo.
Eu encontrei a resposta aqui , a resposta de Zachary Ware. Usei yum install libffi-dev
para consertar.
Eu encontrei a resposta aqui , a resposta de Zachary Ware. Usei
yum install libffi-dev
para consertar.
Sim, funcionou para mim, verifiquei se esses pacotes estão instalados no meu Centos 7:
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
Em seguida, reinstalei meu python 3.8.1:
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
Então, finalmente consegui instalar o docker-compose:
pip3.8 install docker-compose
Obrigado @grossshen
Comentários muito úteis
Eu encontrei a resposta aqui , a resposta de Zachary Ware. Usei
yum install libffi-dev
para consertar.