Mycroft-core ubuntu install cython_sources error

I am struggling to install the Mycroft-core on an Ubuntu 22.04 server, following the Mycroft website instructions “installing via git clone”. All seemed good until this error: File “/tmp/pip-build-env-cf_26bzg/overlay/lib/python3.10/site-packages/setuptools/_distutils/cmd.py”, line 107, in getattr
raise AttributeError(attr)
AttributeError: cython_sources

I have not found any obvious solution to this problem via google. Can anyone help me get passed this error?

If this is your first time trying to run an assistant, you should look into OVOS or NEON instead. See elsewhere; tldr: mycroft is all but dead.

I like to drop the FAQ for a drive-by FAQ: OVOS, Neon, and the Future of the Mycroft Voice Assistant

though I am now noticing that it’s due for an update. 4:59 PM is quite a moment to notice a task.

1 Like

Thanks very much! I thought it was strange that the Mysroft information was all about 2 years old, now I know why!
Perhaps you could explain one other thing: there seems to be two Mycroft forums, this one and Mycroft Chat. I think you would call me a hobbyist with no real developer experience, but a powerful drive to produce a dedicated voice assistant for my wife who has some special needs. Which forum would you recommend?

This one is fairly responsive, but if you’re looking for something generally real-time hit up Matrix: You're invited to talk on Matrix

Do you have a Mark 2? Or are you looking to build on other hardware?

Just read Ubuntu Server 22.04. Check out GitHub - OpenVoiceOS/ovos-docker: Open Voice OS container images and docker-compose.yml files for x86_64 and aarch64 CPU architectures. for a quick start for OVOS running in containers. The README is very thorough and several of us run assistants this way and are happy to help!

Thanks Mike, much appreciated. I don’t have a Mark 2, still trying to figure out what to do. I have ubuntu running in a VPS server but I want to set things up on my Windows 10 pc where it is easier to test audio in and out. I will look into WSL2 and Docker

Good deal! I’m happy to help troubleshoot any WSL2/Docker issues since I have that set up as a POC on my gaming laptop.

Well actually I may need a little help…I followed the OVOS procedure for installing WSL2, Docker, and Pulseaudio but when I tried to test the pulseaudio I got errors as follows

chris@Chris-PC:~$ docker run --rm -it -v ~/.config/pulse:/home/pulseaudio/.config/pulse keinos/speaker-test

speaker-test 1.2.2

Playback device is default
Stream parameters are 48000Hz, S16_LE, 2 channels
WAV file(s)
ALSA lib confmisc.c:767:(parse_card) cannot find card ‘0’
ALSA lib conf.c:4693:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4693:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4693:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5181:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM default
Playback open error: -2,No such file or directory

I read some pretty complicated advice online which involved installing a different copy of pulseaudio under windows rather than WSL2/Ubuntu. Is that what I have to do, or is there some more simple solution to this error?

Without launching into the minutiae, the need for PulseAudio under Windows is the error. Via PulseAudio, you’re providing a way for software running inside WSL to use the audio stuff from Windows.

That advice you found online is mostly obsolete - using the latest version of WSL2, Microsoft packages WSLG as a separate VM that handles both PulseAudio and GUI concerns. There’s no need to install Pulse in Windows or in your WSL2/Ubuntu distro because of this additional passthrough VM.

Just to isolate potential issues, are you running the latest version of WSL2? Do you have Pulse installed explicitly in either your Ubuntu WSL2 instance or in Windows?

There may need to be at least one more volume mount for that docker run command to work properly.

It seems that I have the latest verion of wsl2:
PS C:\WINDOWS\system32> wsl --version
WSL version: 1.2.5.0
Kernel version: 5.15.90.1
WSLg version: 1.0.51
MSRDC version: 1.2.3770
Direct3D version: 1.608.2-61064218
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.19045.3208

Pulseaudio was installed in the WSL2/Ubuntu instance via apt install -y pulseaudio, it is verion 15.99.1. I have not installed pulseaudio in Windows.

Docker is a bit of a mystery to me. I see that I can create multiple volume mounts, but how I would I use them to make pulseaudio run without error?

The appropriate volume mounts give Docker access to the sound device. On systems where the sound device is not available, Pulse exposes a server to connect to instead.

Try adding another volume mount: -v /mnt/wslg/:/mnt/wslg/

Thanks MIke. I assume you mean adding the mount instruction at the end of the container run command, like so:
docker run --rm -it -v ~/.config/pulse:/home/pulseaudio/.config/pulse keinos/speaker-test -v /mnt/wslg/:/mnt/wslg/
Unfortunately this gives the same result of “ASLA lib cannot find card ‘0’ …” etc.

If it is relevant, docker desktop shows that a keinos/speaker-test container exists but no reference that I can find to a wslg volume mount

The container name must be at the end of the Docker command. Your mount isn’t being read

OK, I read around the subject and then updated the command to be:
docker run --rm -it -v ~/.config/pulse:/home/pulseaudio/.config/pulse keinos/speaker-test -v /mnt/wslg/:/mnt/wslg/ keinos/speaker-test

Unfortunately this still produces the same error: "ALSA lib…cannot find card ‘0’ "
Is there still something wrong with the docker run command, or do you think there may be some other problem?

I can replicate the same issue, but as I recall, it shouldn’t impact the assistant. Try running the assistant and see if that works?

Thanks Mike. Well I followed to steps outlined to install the OS core. All went well until I came to the point of composing the image files, when this happened:

chris@Chris-PC:~/ovos-docker/compose$ docker compose --project-name ovos up -d
[+] Running 35/25
:heavy_check_mark: ovos_listener 7 layers [⣿⣿⣿⣿⣿⣿⣿] 0B/0B Pulled 1730.4s
:heavy_check_mark: ovos_phal_admin 1 layers [⣿] 0B/0B Pulled 1174.4s
:heavy_check_mark: ovos_audio 9 layers [⣿⣿⣿⣿⣿⣿⣿⣿⣿] 0B/0B Pulled 1129.8s
:heavy_check_mark: ovos_core 2 layers [⣿⣿] 0B/0B Pulled 1197.4s
:heavy_check_mark: ovos_cli 1 layers [⣿] 0B/0B Pulled 1226.1s
:heavy_check_mark: ovos_messagebus 1 layers [⣿] 0B/0B Pulled 717.5s
:heavy_check_mark: ovos_phal 7 layers [⣿⣿⣿⣿⣿⣿⣿] 0B/0B Pulled 1173.9s

[+] Running 10/11
:heavy_check_mark: Volume “ovos_vosk” Created 0.0s
:heavy_check_mark: Volume “ovos_nltk” Created 0.0s
:heavy_check_mark: Volume “ovos_listener_records” Created 0.0s
:heavy_check_mark: Volume “ovos_models” Create… 0.0s
:heavy_check_mark: Container ovos_messagebus S… 6.8s
:heavy_check_mark: Container ovos_cli Started 6.8s
⠿ Container ovos_phal Startin… 3.6s
:heavy_check_mark: Container ovos_phal_admin S… 3.6s
:heavy_check_mark: Container ovos_audio Create… 0.7s
:heavy_check_mark: Container ovos_core Created 0.6s
:heavy_check_mark: Container ovos_listener Cre… 0.6s
Error response from daemon: error gathering device information while adding custom device “/dev/snd”: no such file or directory
chris@Chris-PC:~/ovos-docker/compose$

So far as I can make out the directory /dev/snd is involved in sound production, so I guess my pulseaudio problems are still in the way. Any idea what I can do now?

That’s the Linux compose file. There’s a separate one for Windows/WSL2:

docker compose --project-name ovos -f docker-compose.windows.yml --env-file .env up -d