Give OctoPrint a go on Python 3! Upgrade here

Upgrade OctoPrint to Python 3!

:point_right: This post was about my OctoPrint Upgrade To Python 3 script, which you can find more details about by reading the blog post


Updated, to now include the redirect from Makes the URL a bit easier to type!

Just a quick note: If anyone is using OctoPi 0.16, could they let me know this has worked for them, thanks!

Update: currently incompatible to OctoPi 0.16 as it comes with Python 3.5 installed, which is below the minimum requirement for OctoPrint. Hopefully should be getting this sorted soon.

I'm running the OctoPi 0.18 Beta (Pi4 8gb). Would this be "safe" to run, or because I'm on beta should I wait? Thx in advance...

It should be fine, I know a couple of people who have done it. However, depends when the beta was made, they now come with Py3 by default. But the script will check that and let you know, so go for it!

It worked great, thanks!

Updated the post as it is not possible to install OctoPrint Py3 on OctoPi 0.16 since Debian Stretch only has 3.5.3 in the repo, and OctoPrint requires >=3.6. As a result the script will check this, and does not install.

I'm running OctoPi 0.16 or earlier. What can I do?

Use OctoPrint's built in backup function, then re-image with OctoPi 0.17 or later - If you use the nightly 0.18 builds, then you can get straight into Python 3 without this script.

It is possible to upgrade from stretch to buster, but it requires quite a lot of effort and is not guaranteed to work flawlessly. I did try this, but it took a long time and decided it was not worth it, when there is another solution available.

does this mean it's finally time to roll out a new version of octopi? as it's pretty dated comming out of the box now that you have to upgrade python..

OctoPi comes with both Python 2 & 3 installed, as Raspberry Pi OS does I believe - that's why this upgrade is here. Takes OctoPrint installed on Py2, moves it to Py3.

OctoPi 0.18 does have Py3 as the default, but due to having to wait for the plugin repository to become Py3 compatible its not released yet. It is in nightly builds, but seeing as they are development nightlies, it doesn't make sense to roll it out to everyone.

Continuing the discussion from Give OctoPrint a go on Python 3! Upgrade here:

I apologize for not being a coder. I was able to install the plugin to check to see if all of my plugins are Python 3 compatible and they are. I do not know how to access the server however. I am working on a Mac and I assume that I should be coding through Terminal but that makes me nervous. I do not know if that is an SSH interface anymore, etc. Are there some simple instructions which could lead me through the upgrade to Python 3?