./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.
๋ผ์ฆ๋น์ ์ค์น.
"sgml-base์ ๋ํ ์ฒ๋ฆฌ ํธ๋ฆฌ๊ฑฐ"๊ฐ ๋ ๋ฒ ๋์ด๋๋ค๋ ์ ๋ ํฅ๋ฏธ๋กญ์ต๋๋ค. ์ด์ํ?
์ฌ๊ธฐ์์ ํด๊ฒฐ ๋ฐฉ๋ฒ ์ธ ๊ฒ ๊ฐ์ต๋๋ค. ๊ทธ๋ฌ๋ ์ด๊ฒ์ ์ฌ์ ํ โโ๋ฒ๊ทธ์
๋๋ค.
https://stackoverflow.com/questions/27022373/python3-importerror-no-module-named-ctypes-when-using-value-from-module-mul
Raspbian์์๋ ์ค์น ์คํฌ๋ฆฝํธ์ ๋ค์์ ์ถ๊ฐํ ์ ์์ต๋๋ค.
Git์ ์ด๋ฏธ ์ค์น๋์ด ์์ต๋๋ค. ๋ฐ๋ผ์ git์ ํตํด 'mycroft-core' ๋๋ ํ ๋ฆฌ ๋ด์ 'cpython' ํ์ ๋๋ ํ ๋ฆฌ์ git repo๋ฅผ ๋ค์ด๋ก๋ํฉ๋๋ค.
git clone https://github.com/python/cpython.git
๊ทธ๋ฆฌ๊ณ ๊ทธ๊ฒ์ ๋น๋ํ๊ณ ์ปดํ์ผํ์ญ์์ค:
cd cpython
./configure
make -j 4
sudo make altinstall
cd ..
git์ด ์ค์น๋์ง ์์ ๊ฒฝ์ฐ(์ด ์คํฌ๋ฆฝํธ๋ ๋ชจ๋ Linux์์ ์คํ๋๋ฏ๋ก) git clone
์ ์ ๋ค์์ ๊ณ ๋ คํ์ญ์์ค.
์์ค์์ ์ค์น:
https://git-scm.com/book/en/v2/Getting-Started-Installing-Git
์๋ก์ด ๋ฌธ์ :
cpython
์ปดํ์ผํ๊ณ ์ค์นํ ํ start-mycroft.sh
์คํฌ๋ฆฝํธ๋ ์ฌ์ ํ ์คํจํ์ง๋ง ์คํจํ ํ์๋ ๊ณ์๋ฉ๋๋ค.
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
์คํจํ ํ ์ค์น๋ ๊ฒ์ฒ๋ผ ์๋ํฉ๋๋ค.
./start-mycroft.sh debug
๋ฅผ ์ฌ์ฉํ๋ ค๊ณ ํ๋ฉด ์ฌ๋ฌ ์ค๋ฅ์ ํจ๊ป ์คํจํฉ๋๋ค.
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'
picroft๋ฅผ ์ฌ์ฉํ์ง ์๊ณ ์๋ค๊ณ ์๊ฐํ๋ฉด ์๋ํฉ๋๋ค.
Guessing you're not using picroft, which just works.
์ณ์. GUI ํ๊ฒฝ์์ ๋ด Rpi๋ก ๋ค๋ฅธ ์์ ์ ํ๋ ๊ฒ๋ ์ข์ํ๊ณ Picroft๊ฐ ์ ๋๋ก ์คํ๋์ง ์๊ณ ๊ธฐ๋ณธ USB ๋ง์ดํฌ๋ฅผ ๊ฐ์งํ์ง ๋ชปํ๊ธฐ ๋๋ฌธ์ ๋๋ค. GUI ์์ด ๋ฒ๊ทธ๋ฅผ ๋ณด๊ณ ํ ์ ์์
์ด๊ฒ์ ์ ๋ง ์ด์ํ ๋ฌธ์ ์ ๋๋ค. ์ฅ์น์ Python ํ๊ฒฝ์ด ์ ๋๋ก ์๋ํ์ง ์๋ ๊ฒ ๊ฐ์ต๋๊น? _ctypes๋ mycroft virtualenv๋ฅผ ๋ง๋๋ ๋ฐ ์ฌ์ฉ๋๋ ๋ก์ปฌ python ํ์ค ๋ผ์ด๋ธ๋ฌ๋ฆฌ์ ํฌํจ๋์ด ์์ต๋๋ค.
mycroft-core ๋๋ ํ ๋ฆฌ rm -rf .venv
์์ .venv
ํด๋๋ฅผ ์ญ์ ํ ๋ค์ dev_setup.sh ์คํฌ๋ฆฝํธ๋ฅผ ๋ค์ ์คํํ ์ ์์ต๋๊น?
์๋ ํ์ธ์, ์ด ๋ฌธ์ ์ ๋ํด 4๊ฐ์ ๋์ ์ฐ๋ฝ์ด ์์๊ธฐ ๋๋ฌธ์ ์ข ๋ฃํ๊ฒ ์ต๋๋ค. ์ด ๋ฌธ์ ๊ฐ ๊ณ์ ๋ฐ์ํ๋ฉด ๋ฌธ์ ๋ฅผ ๋ค์ ์ฌ์ญ์์ค.
์ฌ๊ธฐ ์์ ๋ต์ ์ฐพ์ yum install libffi-dev
๋ฅผ ์ฌ์ฉํ์ฌ ์์ ํ์ต๋๋ค.
์ฌ๊ธฐ ์์ ๋ต์ ์ฐพ์
yum install libffi-dev
๋ฅผ ์ฌ์ฉํ์ฌ ์์ ํ์ต๋๋ค.
์, ์ ์๊ฒ ํจ๊ณผ์ ์ด์์ต๋๋ค. 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
๊ทธ๋ฐ ๋ค์ 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
๊ทธ๋ฐ ๋ค์ ๋ง์นจ๋ด docker-compose๋ฅผ ์ค์นํ ์ ์์์ต๋๋ค.
pip3.8 install docker-compose
@grosshen ๊ฐ์ฌ
๊ฐ์ฅ ์ ์ฉํ ๋๊ธ
์ฌ๊ธฐ ์์ ๋ต์ ์ฐพ์
yum install libffi-dev
๋ฅผ ์ฌ์ฉํ์ฌ ์์ ํ์ต๋๋ค.