Mycroft Community Forum

Missing Pieces! Appimage?

I hope I’m putting this post in the right category. I did look through the categories and none of them seemed exactly right. Thus, it sits here.

So, Is there an appimage someplace that I can use to install Mycroft on my Debian based linux PC?

I was able to install Mycroft on my linux mint mate 19.1 PC. All seemed to go well and it started up recognizing my voice and responding to my questions about the time and the date and Lincoln’s height, etc., etc. No errors. No problems.

But then I found a couple of skill packages that I tried to install and the problems began. One of them worked a little bit most of the time. But the few commands it did recognize from the skill’s list weren’t really the ones that were all that useful, TBH. The other skill packages didn’t respond at all after they were installed.

One of them that I was able to troubleshoot a bit was missing a particular python module and so didn’t load. I found and installed the missing module and, although that resolved that particular log error, the package still didn’t respond at all afterwards.

I’m not at all sure that it or any of the other two or three skills I tried to use actually loaded successfully or not. It looked like they did judging from the log entries but they had no response at all, so I don’t know.

I was thinking that I would have a better chance of getting Mycroft skills to work if I could install Myfroft core from an appimage that would include dependencies that I otherwise may not have on my system.

Is such an appimage available? And, if so, where?

Thanks much!

Hi Lendal,

Welcome to Mycroft :slight_smile:

We don’t have an AppImage of Mycroft yet. Currently we’re looking at Snaps which would produce the same result.

However this still requires Skills to properly document their requirements which sounds like one of the problems here. Which Skill did you have to install an extra module for?

Thanks for your response.

The skill was “desktop-control.mycroftai”. Here’s the exact log message detailing the problem.

“2020-05-04 14:52:25.270 | ERROR | 7395 | mycroft.skills.skill_loader:_load_skill_source:215 | Failed to load skill: desktop-control.mycroftai (ModuleNotFoundError(“No module named ‘pyautogui’”,))”

I searched for “pyautogui”, found it and installed it. The error message went away but the skill continued to not respond. I followed the spoken command write out on screen and made sure I was being properly recorded.

But, nevertheless, there was never any response other than to state that I was not understood no matter which of the commands, listed in the readme file, I used.

How did you install that one?

It seems to have pyautogui listed in the requirements so installation must have failed somehow.

Did you use MSM or just clone the Skill onto your device?

I’m sorry. I’m not quite sure I understand you.

Did you mean the installation of pyautogui failed or that the installation of the skill failed?

Also, I don’t know what MSM is. Sorry, again. I downloaded the skill’s zip file from github, as I recall. And copied it into the mycroft skill directory. Is that what you meant by ‘clone the skill’?

If you meant the installation of pyautogui failed, I have tried to load that using both pip and apt. I read the terminal messages resulting from those attempts which, I believe eventually stated that I did manage to load pyautogui successfully.

However, the mycroft skill log still indicates a missing ‘pyautogui’ module, as per the log entry in my previous post here. I made sure python 3.6 is installed and after several (I believe successful) attempts to load the ‘pyautogui’ by itself, I don’t know what else to try.

And, of course, Jarvis is no help at all. Although he does seem quite pleased with himself over having the correct date and time data at his digital fingertips for whenever the need for that info arises.

Some additional information…

I spent several hours last night trying to figure this out and am learning a bit about how python works. Apparently, I have several versions of python installed and they all seem to have their own /usr/lib subdirectories.

I’m thinking that the installs of pyautogui that I’m doing aren’t going to the same /usr/lib subdirectory that the python script for this skill is expecting to find them.

Also, I’m not sure that my system needs to be complicated by having six different versions of python installed (yes, actually six versions!). Why aren’t the older versions being replaced by the newer version installs? Aren’t the newer versions backwards compatible? Should I be removing these older versions manually? That seems a little risky.

So, I guess what I need to figure out is how to get the pyautogui to install into the right place so that the desktop-command.mycroft skill can find it. The skill seems to be looking in the /usr/lib/python3.6 directory and not finding the module.

Installing the pyautogui module with pip3 puts out a ton of messages, most of which are useless to me as I have no idea what it’s actually doing or what it’s supposed to be doing. Except for the fact that at the very end of the message torrent it states that it did install the module. Apparently, in spite of errors, per the pip3 output. And, as near as I can tell, it does also appear to be aimed at the /usr/lib/python3.6 directory.

The following are two excerpts from the “pip3 install pyautogui” command. the first containing the error message. The second stating that the module was installed:

Here’s the first:

" Running setup.py bdist_wheel for pyautogui: started
Running setup.py bdist_wheel for pyautogui: finished with status ‘error’
Complete output from command /usr/bin/python3 -u -c “import setuptools, tokenize;file=’/tmp/pip-build-h2nqtxl3/pyautogui/setup.py’;f=getattr(tokenize, ‘open’, open)(file);code=f.read().replace(’\r\n’, ‘\n’);f.close();exec(compile(code, file, ‘exec’))” bdist_wheel -d /tmp/tmpsi7tsm0upip-wheel- --python-tag cp36:
/usr/lib/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: ‘long_description_content_type’
warnings.warn(msg)
usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] …]
or: -c --help [cmd1 cmd2 …]
or: -c --help-commands
or: -c cmd --help

error: invalid command ‘bdist_wheel’"

And here’s the second excerpt:

" Running setup.py clean for pyrect
Failed to build pyautogui PyTweening mouseinfo pygetwindow pymsgbox pyscreeze python3-Xlib pyperclip pyrect
Installing collected packages: PyTweening, pyperclip, python3-Xlib, Pillow, mouseinfo, pyrect, pygetwindow, pymsgbox, pyscreeze, pyautogui
Running setup.py install for PyTweening: started
Running setup.py install for PyTweening: finished with status ‘done’
Running setup.py install for pyperclip: started
Running setup.py install for pyperclip: finished with status ‘done’
Running setup.py install for python3-Xlib: started
Running setup.py install for python3-Xlib: finished with status ‘done’
Running setup.py install for mouseinfo: started
Running setup.py install for mouseinfo: finished with status ‘done’
Running setup.py install for pyrect: started
Running setup.py install for pyrect: finished with status ‘done’
Running setup.py install for pygetwindow: started
Running setup.py install for pygetwindow: finished with status ‘done’
Running setup.py install for pymsgbox: started
Running setup.py install for pymsgbox: finished with status ‘done’
Running setup.py install for pyscreeze: started
Running setup.py install for pyscreeze: finished with status ‘done’
Running setup.py install for pyautogui: started
Running setup.py install for pyautogui: finished with status ‘done’
Successfully installed Pillow-7.1.2 PyTweening-1.0.3 mouseinfo-0.1.3 pyautogui-0.9.50 pygetwindow-0.0.8 pymsgbox-1.0.8 pyperclip-1.8.0 pyrect-0.1.4 pyscreeze-0.1.26 python3-Xlib-0.15"

So, according to that, the module did install but with error(s)? However, the skill installation still complains about ‘not finding’ the module in the /usr/lib/python3.6 subdirectory.

Therefore, I’m now considering manually removing all of the non-3.6 versions of python. I’m not sure how, exactly, but there must be a way to do that. And then reinstalling, again, the pyautogui module.

And also I probably should be trying to find out how to fix the error(s) with the module install. Maybe add another different software repository or something?

So, if someone could stop me before I run completely amok with this, I’d greatly appreciate it, although it may already be too late.

Thanks.

Add’l info: this morning I fixed the error in the pyautogui install. I had to first install ‘wheel’ with the pip and pip3 commands.

So, no more errors with “pip install pyautogui” or “pip3 install pyautogui”.

I even tried inserting several different hash bang lines in the skills’ python script with different python version numbers. The skills’ python script still can’t import it, though.

Another Update:

I created my own python script. It’s ridiculously simple and does nothing but import the pyautogui script and execute a mouse move operation with it. No errors. No problems. The mouse moves as it should. Here’s the script:

#!/usr/bin/env python
#Importing modules
import sys
import re
import pyautogui
pyautogui.moveTo(int(600), int(400))
exit

The python script in the “desktop-control” skill that tries and fails to import the pyautogui module still fails with the exact same error msg in the /var/log/mycroft/skills log as above. No change.

There is obviously something else going on here that I don’t understand. Possibly something to do with how the skill script is called, maybe?

I never thought I’d say this but I’m starting to miss Windows 10 and now thinking of taking up crocheting instead of spending my time fussing with CLI Linux and Python.

I’m not sure which of those things is more worrisome.

Good news!!

Ahem: “2020-05-14 19:32:23.729 | INFO | 21964 | mycroft.skills.skill_loader:_communicate_load_status:279 | Skill desktop-control.mycroft loaded successfully”

I fixed it! The pyautogui module now loads perfectly!

Whew That was a lot of work. And almost worth it for the feeling of accomplishment. I’m still amazed that someone like me, a skill-less noob, with no python knowledge and even less ability with the Linux command line, could figure out and fix something as complicated, technical and downright trickey as this was.

Yay, me! I’m going to stop running around in circles, sit down for a moment or two, take some deep breaths and repeat over and over again, “my hair is NOT on fire”. Yes! I’m feeling so much better now.

Does anyone want to buy some almost new crocheting hooks? I’m thinking of abandoning that and taking up a career in IT (Incompetent Technically) instead.

2 Likes

Hey Lendal,

Great to hear it’s working :tada:

This Skill isn’t in the Marketplace as it hasn’t been tested adequately.

MSM is the Mycroft Skills Manager. It’s job is to install Skills, make sure all their dependencies are also installed, do updates, and uninstall things. So if you want to install another Skill from Github, it’s definitely a much easier route to go.

If you installed the helper scripts when installing Mycroft you can use:

mycroft-msm install https://github.com/author/skill-repository

Otherwise you need to first activate the Mycroft Virtual Environment:

cd ~/mycroft-core # or where ever you installed Mycroft
source .venv/bin/activate
msm install https://github.com/author/skill-repository

MSM will grab the Skill from Github and then check files like requirements.txt for other things the Skill needs to run properly. These are all installed inside the Mycroft virtual environment so they don’t clutter up your system