[SOLVED][Manjaro Linux] "Failed building wheel for pyyaml" when running dev_setup script

The output is here. I believe the relevant issue is at line 656 (Failed building wheel for pyyaml).

If anyone knows what is going on, I would appreciate some help.

Looks like you’re using python3.7, check https://github.com/pygame/pygame/issues/382

What am I supposed to do about that?

One person says:

The source file pypm.c needs to be regenerated with Cython >= 0.27.3 for Python 3.7 support

Which file is analogous to pypm.c, and what would I do to regenerate it?

Also, am I supposed to use a different python version? I just use the most recent version my package manager gives me.

OK, from what I can see the actual pyyaml package has not been updated for Python 3.7, and this is flagged as an issue on GitHub here. The workaround suggested is to use a git based installation of pyyaml by running;

pip install git+https://github.com/yaml/pyyaml.git

The broader issue here of course is how can we manage so many Python dependencies across versions - and this is one of the downsides of Python mentioned recently in this blog post by @steve.penrod - leading to the use of venv - a virtual environment.

Can you let us know if the git install of pyyaml works?

I think you are on to something here, but I did the git install and I get the same error about failing to build. I wonder if maybe I did not delete something from the times I tried to install earlier. I deleted /opt/mycroft/* and ~/Custom/mycroft-core/* and any dotfiles in my home directory with “mycroft” in the name, and tried installing mycroft both from git clone and from the latest release on github, with the same result each time.

Adding that just below line 190 and moving the ‘; then’ to the end of the new line 191 in dev_setup.sh fixed the issue for me on Arch Linux. Thanks

EDIT

Now I get the error ‘ModuleNotFoundError: No module named ‘inflection’’ when running ./start-mycroft.sh debug

Having the same issue on Manjaro Linux (Arch Derivative) when doing a fresh install of mycroft-core.

Scanning through @kingkoronov output, mine looks the same, which makes sense.

I tried to install pyyaml from git and got this error:

 [USER@COMPUTER mycroft-core]$ pip install git+https://github.com/yaml/pyyaml.git
Collecting git+https://github.com/yaml/pyyaml.git
Cloning https://github.com/yaml/pyyaml.git to /tmp/pip-req-build-gh72m6ny
Installing collected packages: PyYAML
Found existing installation: PyYAML 3.13
Cannot uninstall 'PyYAML'. It is a distutils installed project and thus we cannot accurately determine   which files belong to it which would lead to only a partial uninstall.

Anything else you would like us to try @KathyReid or are there any updates on this issue?

1 Like

Hi @Spacesurfer - to be honest this isn’t really a Mycroft issue - this is due to the way pyyaml is packaged in Manjaro linux. Really the only thing I could recommend, if it’s installed by distutils - which doesn’t have an uninstall function from memory - would be to manually remove the pyyaml package using something like pacman, then re-run the ./dev_setup.sh script again.

1 Like

There is no pyyaml package on Manjaro (or Arch). There is python-yaml.
When I try to install following the instructions in mycroft-core GitHub Readme.md, I receive the aforementioned “failed building wheel for pyyaml” error, but later I see a question ‘Warning: Failed to install all requirements. Continue? y/N’. When I proceed with pressing y, I get the error mentioned by @Lou_Minartey. AUR package is outdated. I can provide logs and outputs upon request.

Logs would be helpful, however none of us here run Arch/Manjaro, and we’re pretty focussed on some core deliverables, so won’t have a lot of time to set up an Arch/Manjaro VM and test. What would be really useful here is if someone who runs Arch/Manjaro could dig into this package dependency and find out what the root cause is; we can then help by pulling in commits or other packages.

1 Like

Thank you for the response.
Do you consider packaging Mycroft as a Flatpak/Snap? That is multi-platform (All major Linuxes support Flatpak, and it now even runs -not without bugs- on Windows 10). This way you could bundle all dependencies and libraries with Mycroft-core. This also would solve the problem of specific Python versions as it runs containerized. However, Flatpak and Snap offers access to hardware (Speaker and mic, printers, storage, etc.). Sadly I’m not a developer and don’t have much much free time right now, but if there is a way I could help the project, tell me. Logs of install on Manjaro coming in 24 hours.
Best wishes.

here is the log file of the installation (output of dev_setup.sh).
The Hungarian babble about packages at the beginning are just Pacman telling me that the packages selected to install are already installed. I followed the steps in README.md.

There is a Mycroft-core package in AUR which does not work. Should I provide logs of trying to run Mycroft? (as instructed in README.md)

I did successfully compiled everything on arch by editing requirements.txt and changing the pyyaml version from 3.11 to 3.13.

2 Likes

Thanks for posting @malevolent, just to confirm is this the requirements.txt in
/mycroft-core/requirements.txt
?
If so I can try the same and rebuild on Ubuntu to see if we have a valid solution for this :+1:

yes, when I did execute ./dev_setup.sh I ran into the same problem, by editing mycroft-core/requirements.txt and changing the PyYAML version, dev_setup.sh ended with no error.

1 Like

thx @malevolent, I will build on Ubuntu and let you know how I go.
Do you have a GitHub username so I can properly credit you?
Best, Kathy

I’m adocampo at github. :wink:

1 Like

Aaaaah! Thank you for all your recent work, too!

Builds perfectly in Ubuntu, I’m raising a PR.

Glad to hear that!!! :metal:

@koma111, AUR package also compiles for me (after modifying requirements.tcxt), but even if installs mycroft-core, and plasma widget works pointing to AUR package’s location, I cannot start the unit file, so for the moment, I would suggest to install mycroft with the manual method instead AUR

1 Like