Mycroft-core: Add Python3 support.

Created on 27 Sep 2016  Â·  14Comments  Â·  Source: MycroftAI/mycroft-core

Python2 is only going to be supported for another 3 years. At which time it will be retired. This being a new project it should support Python3.

I wouldn't mind going through this and starting to port over some of the code to Python3 if the project leaders will commit the changes.

Most helpful comment

Finally we can close this. Took some time (too much!) and effort but it's done.

All 14 comments

We have just now updated master with some changes that were blocking development. If someone wanted to spearhead the migration effort, please do.

Do we know if the Python2 requirement is on Mycroft's end or on one of the dependencies? 'Cause it's just in Mycroft, I'm willing to bet that futurize will go a long way to making things work in both Python 2 and 3.

I believe the last time we looked into porting to Python 3 there were some dependency reasons. But that has been quite a while ago, so may be cleared up now. I'll check around to see if anyone recalls what pieces weren't ready at that time.

Things have been a bit busy on my end so I have not been able to start yet but once things get stable again I plan to start a Python3 branch of this repo. The plan would be to slowly update the repo to be compatible with 2 and 3.

So far its going rather smooth.

I had started to write a skill in Python 3, but found that the default was still on Python 2.x. Also, some of the skills use Python 2.x libraries that don't have Python 3 versions. Is there a way / place to track this effort besides just this Issue?

We are _very_ close to making the Python 3 cutover -- we've testing it for about a month and are preparing to switch our default package to use it. Stay tuned!

Great, thanks! Is there a branch in particular where that's happening, particularly in the skills repo? I don't want to run it yet (I'll wait for a release.)

I just want to use the same kinds of packages in my own skill that you'll be using in the official skills on Py 3.

There's a branch called 18.02 which has the current work. Running drv_setup.sh will set up a python3venv separate from the current env so you can run both versions side by side.

Not all official skills will work under py3 yet.

Is there (could there be) a list of baked-in Python libraries? My thinking is that you could have a core set of libraries that skills could depend on, installed once. I see a lot of skills with requests for example, and not sure how useful it is to have a bunch of different versions of requests on the system.

That makes me wonder whether each skill is running in its own virtualenv? I haven't looked deeply enough to know that.

Hi @mathias currently the skills are all running in the same env as mycroft (and thus have access to all the modules in the requirements.txt in mycroft core). The plan is to rework the architecture to have the skills in separate environments for the 18.08 release.

thanks for clarifying!

Finally we can close this. Took some time (too much!) and effort but it's done.

🎉

On Tue, Oct 30, 2018 at 10:23 AM Ã…ke notifications@github.com wrote:

Closed #366 https://github.com/MycroftAI/mycroft-core/issues/366.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/MycroftAI/mycroft-core/issues/366#event-1935389919,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAANDOU_UhnoRjzu4u32kNG_7d5NId-Aks5uqG7dgaJpZM4KH90j
.

>

Sent from my supercomputing distraction machine.
I blog at http://blog.mattgauger.com

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mghoffmann picture mghoffmann  Â·  6Comments

ryanleesipes picture ryanleesipes  Â·  4Comments

fxdgear picture fxdgear  Â·  6Comments

tiagochiavericosta picture tiagochiavericosta  Â·  6Comments

tmajibon picture tmajibon  Â·  9Comments