Build an open future with us.

Invest in Mycroft and become a community partner.

Cannot boot mycroft from Ubuntu 18.04


#1

It was fine with 16.04, but this line showed up when booting from 18.04:
Starting cli
File “/home/*/mycroft-core/mycroft/client/text/main.py”, line 22
print(sys.stdout.getvalue(), file=sys.stdout) # noqa
########################^
SyntaxError: invalid syntax
Anyone knows how to fix this? I haven’t exactly studied Python.
(I added hash signs because the forum does not display spaces in the front)


#2

Thanks for reporting this, @Notimportant, and sorry to hear you’re encountering this issue.

I’m wondering here if this is a result of the change to Python 3.4+ we implemented with Release 18.2.6b that dropped today. There are several changes between Python 2.7 and Python 3.4+ which are outlined in our recent blog post about the Python change.

In particular, Python 3.4+ opens stdout, stdin and stderr as unicode strings, rather than byte strings, by default. I think this might be part of the problem.

I’m going to ping my colleagues @forslund and @Wolfgange here to see if they have suggestions.


#3

I encounter this error on 18.04 as well.


#4

Unfortunately I’m on 16.04 at the moment; let me spin up an 18.04 virtual and see if I can replicate / dig at it.


#5

I found a solution here.

I think the issue for me was that I was installing on crouton, which did not yet have pip. So I ran:

sudo apt-get install python-pip

and then reran:

bash dev_setup.sh

and this appears to solve the problem.


#6

Thanks @DerekCaelin, you’re doing better than me, I couldn’t get VirtualBox running!!


#7

So I got past this error message (exactly same as OP’s) by updating my version of python from 2.7 to 3.2.
Python3 was not installed (using Elive 2.9.92, ie-> Debian stable Wheezy 7.11) so I installed it and then went through this process to change the default version to 3.x

That got rid of the original error, but now I get another error instead:

Starting cli
Traceback (most recent call last):
  File "/home/robot858/mycroft-core/mycroft/client/text/main.py", line 18, in <module>
    from mycroft.tts import TTS
ImportError: No module named mycroft.tts

So, off to look at that one now…

Link 1: https://linuxconfig.org/how-to-change-default-python-version-on-debian-9-stretch-linux


#8

I too am having this issue, and I have this issue attempting to install on Ubuntu Mate 18.04. I get the same terminal output as the OP which is pretty frustrating since the OP posted some two months ago.

I also get a weird message that the repo is outdated, but when I attempt to update, something fails.

I like the idea of Mycroft, but installation and use needs to be much more ‘user friendly’ if the project isn’t to be just dismissed as a techie project for geeks. Like most, I’m a regular user who would be more than happy to use and report back issues with this important open source project, but we must have an application that can be reliably installed, that has the functionality to actually do things - I successfully installed it on an earlier installation of Ubuntu Mate, but was somewhat dissappointed that many of the stated skill were unavailable or not working.


#9

Hi there @MZTS250Supa5 , thanks for your feedback. We agree with you fully - we want to build out more user-friendly installers over time to remove the headache of manually installing Mycroft - and this is what our Mark 1 and Mark II devices are aimed at.

Specifically concerning the error on Ubuntu 18.04 - did you try the workarounds previously suggested - such as this one?

I also wonder whether this is related to the new virtual environment - .venv we’re using with Python 3.4 - if you’d like more information on that I’d be happy to provide it in case it helps you get up and running on Ubuntu 18.04?

Best, Kathy