mycroft-core: Mycroft do not seems to work anymore due to dependencies update
Hi,
i'm on a Pinephone with PostmarketOS Plasma mobile Edge and seems Mycroft it is not working anymore because dependencies got updated. Starting with mycroft-start all
do not create the usual Mycroft processes and running mycroft-cli-client
trigger the following error:
Could not import the PyAudio C module '_portaudio'.
Traceback (most recent call last):
File "/usr/bin/mycroft-cli-client", line 33, in <module>
sys.exit(load_entry_point('mycroft-core==21.2.1', 'console_scripts', 'mycroft-cli-client')())
File "/usr/bin/mycroft-cli-client", line 25, in importlib_load_entry_point
return next(matches).load()
File "/usr/lib/python3.9/importlib/metadata.py", line 77, in load
module = import_module(match.group('module'))
File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 972, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 972, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 972, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 850, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "/usr/lib/python3.9/site-packages/mycroft/__init__.py", line 17, in <module>
from mycroft.api import Api
File "/usr/lib/python3.9/site-packages/mycroft/api/__init__.py", line 22, in <module>
from mycroft.configuration import Configuration
File "/usr/lib/python3.9/site-packages/mycroft/configuration/__init__.py", line 15, in <module>
from .config import Configuration, LocalConf, RemoteConf
File "/usr/lib/python3.9/site-packages/mycroft/configuration/config.py", line 25, in <module>
from mycroft.util.json_helper import load_commented_json, merge_dict
File "/usr/lib/python3.9/site-packages/mycroft/util/__init__.py", line 26, in <module>
from .audio_utils import (play_audio_file, play_wav, play_ogg, play_mp3,
File "/usr/lib/python3.9/site-packages/mycroft/util/audio_utils.py", line 20, in <module>
import pyaudio
File "/usr/lib/python3.9/site-packages/pyaudio.py", line 116, in <module>
import _portaudio as pa
ImportError: Error loading shared library libjack.so.0: No such file or directory (needed by /usr/lib/libportaudio.so.2)
Seems Mycroft it is not able to found a jack server. I have fixed it by installing pipewire-jack
(since Plasma mobile use pipewire).
After that, a new error is triggered:
Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 568, in _build_master
ws.require(__requires__)
File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 886, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 777, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (requests 2.26.0 (/usr/lib/python3.9/site-packages), Requirement.parse('requests<2.26.0,>=2.20.0'), {'mycroft-core'})
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/bin/mycroft-cli-client", line 33, in <module>
sys.exit(load_entry_point('mycroft-core==21.2.1', 'console_scripts', 'mycroft-cli-client')())
File "/usr/bin/mycroft-cli-client", line 25, in importlib_load_entry_point
return next(matches).load()
File "/usr/lib/python3.9/importlib/metadata.py", line 77, in load
module = import_module(match.group('module'))
File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 850, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "/usr/lib/python3.9/site-packages/mycroft/client/text/__main__.py", line 21, in <module>
from .text_client import (
File "/usr/lib/python3.9/site-packages/mycroft/client/text/text_client.py", line 22, in <module>
from mycroft.tts import TTS
File "/usr/lib/python3.9/site-packages/mycroft/tts/__init__.py", line 20, in <module>
from .tts import TTSFactory, TTS, TTSValidator, PlaybackThread
File "/usr/lib/python3.9/site-packages/mycroft/tts/tts.py", line 38, in <module>
from mycroft.util.plugins import load_plugin
File "/usr/lib/python3.9/site-packages/mycroft/util/plugins.py", line 17, in <module>
import pkg_resources
File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 3243, in <module>
def _initialize_master_working_set():
File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 3226, in _call_aside
f(*args, **kwargs)
File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 3255, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 570, in _build_master
return cls._build_from_requirements(__requires__)
File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 583, in _build_from_requirements
dists = ws.resolve(reqs, Environment())
File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 772, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'requests<2.26.0,>=2.20.0' distribution was not found and is required by mycroft-core
This instead it is simply because py3-requests
has been updated to v2.26.0 and seems mycroft-core
to require a version STRICTLY less than v2.26.0. I suppose an update of mycroft-core
is required to fix this issue.
This is as far as i have gone, maybe after this is fixed, another error will be triggered.
I'm opening the issue here because, even if i'm on PostmarketOS, this problem should also affect Alpine. If not, i'm sorry, just tell me and i will close the issue.
Thanks for the dedicated time and efforts invested, Have a good day