Just running a fresh install of DietPi v7.6.2 on my Raspberry Pi 4 and I’ve run into a glitch with the DietPi-optimized Mycroft installer.
It runs fine until the prompt for PocketSphinx comes up:
Welcome to Mycroft!
This script is designed to make working with Mycroft easy. During this
first run of dev_setup we will ask you a few questions to help setup
your environment.
The Precise Wake Word Engine requires the AVX instruction set, which is
not supported on your CPU. Do you want to fall back to the PocketSphinx
engine? Advanced users can build the precise engine with an older
version of TensorFlow (v1.13) if desired and change use_precise to true
in mycroft.conf.
Y)es, I want to use the PocketSphinx engine or my own.
N)o, stop the installation.
Choice [Y/N]:
hmm I did a test installation and Mycroft installer was working as expected
[ INFO ] DietPi-Software | sudo -u mycroft ./dev_setup.sh -sm, please wait...
Welcome to Mycroft!
This script is designed to make working with Mycroft easy. During this
first run of dev_setup we will ask you a few questions to help setup
your environment.
Do you want to run on 'master' or against a dev branch? Unless you are
a developer modifying mycroft-core itself, you should run on the
'master' branch. It is updated bi-weekly with a stable release.
Y)es, run on the stable 'master' branch
N)o, I want to run unstable branches
Choice [Y/N]: Y - using 'master' branch
Already on 'master'
M dev_setup.sh
Your branch is up to date with 'origin/master'.
Mycroft is actively developed and constantly evolving. It is recommended
that you update regularly. Would you like to automatically update
whenever launching Mycroft? This is highly recommended, especially for
those running against the 'master' branch.
Y)es, automatically check for updates
N)o, I will be responsible for keeping Mycroft updated.
Choice [Y/N]: Y - update automatically
There are several Mycroft helper commands in the bin folder. These
can be added to your system PATH, making it simpler to use Mycroft.
Would you like this to be added to your PATH in the .profile?
Choice [Y/N]: Y - Adding Mycroft commands to your PATH
Type mycroft-help to see available commands.
The standard location for Mycroft skills is under /opt/mycroft/skills.
For convenience, a soft link has been created called 'skills' which leads
to /opt/mycroft/skills.
(Developer) Do you want to automatically check code-style when submitting code.
If unsure answer yes.
Choice [Y/N]: Will install PEP8 pre-commit hook...
Interactive portion complete, now installing dependencies...
Interesting point, the question you got are different from what I have seen
Thanks for trying on your end Joulinar.
What version are you running?
It loos like your Mycroft install prompt didn’t warn you about not having AVX support? Which is when I’m prompted to fallback to PocketSphinx and the install script fails from there.
# The AVX instruction set is an x86 construct
# ARM has a range of equivalents, unsure which are (un)supported by TF.
if ! grep -q avx /proc/cpuinfo && ! [[ $(uname -m) == 'arm'* || $(uname -m) == 'aarch64' ]]; then
echo "
The Precise Wake Word Engine requires the AVX instruction set, which is
not supported on your CPU. [...]
So that explains the new prompt, but as for the install failing (the error from my original post):
bash: line1: jq: command not found
It looks like there’s a bug in the script where jq is called to write some json to file before it’s actually installed later as a dependency.
parse error: Invalid numeric literal at line 1, column 3
Assuming a fresh install, a workaround I’ve found for now is to run the installer until the AVX/Pocketsphinx prompt, create a backup of the mycroft.conf file, delete the original, continue the installer until next prompt and then restore the mycroft.conf file. This just bypasses that if statement with jq.Or of course you could always install from source and modify the dev_setup.sh script.
I’m working on a pull request and I’ve submitted an issue to the Mycroft GitHub.
Turns out, the AVX on aarch64 problem is already fixed on the dev branch.
but you may run into it anyway if you elect to use the ‘master’ branch when prompted by the installer (as the official DietPi documentation recommends). It changes branches mid-install, but after the AVX check. If you cancel the install after switching branches and run it again later, you’ll be wrongly prompted that your system doesn’t support AVX. Hopefully this existing fix will be merged into master soon.
I did still end up writing a fix to solve the jq dependency issue for those actually running Intel/AMD without AVX support (unfortunately, probably very few users here! ’ ). It was also wrongly setting use_precise to ‘true’ instead of ‘false’ in mycroft.conf, so that should be good now.