Giter Club home page Giter Club logo

Comments (19)

dparker2112 avatar dparker2112 commented on May 26, 2024 1

from octoprint-upgrade-to-py3.

cp2004 avatar cp2004 commented on May 26, 2024

Think I've spotted the problem. If you run python3 --version, which version are you running? There's a change in 3.6 that means it can accept bytes, could be that. Although I'm surprised it didn't come up in testing....

from octoprint-upgrade-to-py3.

dparker2112 avatar dparker2112 commented on May 26, 2024

Thanks!

I'm running Python 3.5.3

from octoprint-upgrade-to-py3.

cp2004 avatar cp2004 commented on May 26, 2024

That's it. Let me see, I know how to fix it.

from octoprint-upgrade-to-py3.

cp2004 avatar cp2004 commented on May 26, 2024

@dparker2112 Unfortunately, it appears that OctoPi 0.16 will not support OctoPrint under python 3, as it requires greater than 3.6. I thought incorrectly that 0.16 had Py3.6, but thanks for posting this.

For now, I will mark it as not supported. But, I think there may be a way to update it to 3.6/7/8 to get around this. Apologies for this! Will be giving it a go in the morning.

from octoprint-upgrade-to-py3.

dparker2112 avatar dparker2112 commented on May 26, 2024

OK thanks, hopefully I won't have to reinstall. My other two machines worked just fine so that was awesome, thanks for your work.

from octoprint-upgrade-to-py3.

cp2004 avatar cp2004 commented on May 26, 2024

Pushed back to at least next week, sorry, I don't have a spare SD card to test it.

from octoprint-upgrade-to-py3.

cp2004 avatar cp2004 commented on May 26, 2024

Found an SD card, so working on this hopefully this weekend. Will ping you here as I would like to test it before merging into the main branch.

from octoprint-upgrade-to-py3.

cp2004 avatar cp2004 commented on May 26, 2024

It looks like I may not be able to install Python 3.6 + on OctoPi 0.16 as they're not on the package repo. The only solution so far is building from source, and at that point it is not worth it and you may as well backup, download OctoPi 0.17 or newer and restore.

Will keep looking but it's not looking likely 😢

from octoprint-upgrade-to-py3.

cp2004 avatar cp2004 commented on May 26, 2024

@jneilliii I've got OctoPi 0.16 flashed, but can't find a way to install Python 3.6+. Seems it is not on the debian package repo.

from octoprint-upgrade-to-py3.

jneilliii avatar jneilliii commented on May 26, 2024

Might as well download the nightly octopi build 0.18 and just go straight to python 3 directly.

http://gnethomelinux.com/OctoPi/nightly/

from octoprint-upgrade-to-py3.

jneilliii avatar jneilliii commented on May 26, 2024

Did you do all the apt update/apt upgrade stuff? Wonder if you could add an updated apt repo? More than likely it's because of stretch vs buster.

from octoprint-upgrade-to-py3.

cp2004 avatar cp2004 commented on May 26, 2024

Tried apt update, but not upgrade - 150something packages to update on my little Pi 0.... no thanks. Will look into adding a repo that's got Py 3.6 on - but it's more work than I thought!

from octoprint-upgrade-to-py3.

jneilliii avatar jneilliii commented on May 26, 2024

Yeah, I bet if you upgrade, or potentially do a dist-upgrade you could get around it, but it definitely seems like the easiest route would be to just create a backup, flash the nightly 0.18 build (it's stable, I've been running 0.18 for months) which already is built with python3, and then just restore your backup.

https://www.raspberrypi.org/documentation/raspbian/updating.md

from octoprint-upgrade-to-py3.

cp2004 avatar cp2004 commented on May 26, 2024

So I have managed to install Python 3.7 by changing the repo targets. I ran:

sudo sed -i 's/stretch/buster/g' /etc/apt/sources.list
sudo sed -i 's/stretch/buster/g' /etc/apt/sources.list.d/raspi.list

sudo apt update
sudo apt install python3

and it became Python 3.7

Wondering if that could be packaged into the script and run. Seems likely to me - as long as it isn't unstable to run with some buster packages and some stretch. Also need to decide whether I want to change the repo listing back to stretch afterwards, I'm leaning this way so that it doesn't create any surprises.

from octoprint-upgrade-to-py3.

jneilliii avatar jneilliii commented on May 26, 2024

I'd be more afraid of the python not working right for some reason without a dist upgrade.

from octoprint-upgrade-to-py3.

cp2004 avatar cp2004 commented on May 26, 2024

Have decided to make it a link to a page with 'feel free to run these commands, but no guarantees!' And of course, as Gina said in Discord, 'don't cry if it breaks'!

from octoprint-upgrade-to-py3.

cp2004 avatar cp2004 commented on May 26, 2024

Just tried this myself, and it breaks other python modules as well when upgrading. With quite a lot of effort it is possible to reinstall them but a waste of time when you can just backup and restore. Above commit mentions this in the readme.

from octoprint-upgrade-to-py3.

cp2004 avatar cp2004 commented on May 26, 2024

Closing this since it is (not) solved. Just not possible to do it reliably, so it would be a massive pain to support users through. Sorry, the easiest path is to create a backup, then grab an OctoPi 0.18 nightly which is Python 3 by default.

from octoprint-upgrade-to-py3.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.