Comments (19)
from octoprint-upgrade-to-py3.
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.
Thanks!
I'm running Python 3.5.3
from octoprint-upgrade-to-py3.
That's it. Let me see, I know how to fix it.
from octoprint-upgrade-to-py3.
@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.
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.
Pushed back to at least next week, sorry, I don't have a spare SD card to test it.
from octoprint-upgrade-to-py3.
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.
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.
@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.
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.
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.
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.
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.
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.
I'd be more afraid of the python not working right for some reason without a dist upgrade.
from octoprint-upgrade-to-py3.
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.
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.
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)
- Use Python 3 venv, install `python3-venv` first HOT 1
- [Bug] Pip errors as wheel is not working properly *sometimes*. HOT 4
- upgrade requires python 3.6? HOT 2
- [Bug] ibpython3.7-dev_3.7.3-2+deb10u2_armhf not found HOT 5
- X server needed to run that script ? HOT 2
- [Bug] UnicodeDecodeError running `sudo apt-get update` HOT 2
- [Bug] Can't set locale & Broken pipe error HOT 2
- Need to update pip as well or OctoPrint complains HOT 1
- Suppress pip's `Cache entry deserialization failed` messages HOT 2
- [Bug] After seemingly successful update to python 3, "Software Update" is disabled HOT 4
- [Bug] Updating to Python3 failed with SpaghettiDetective, no connection available anymore HOT 4
- [Bug] HOT 2
- Command line option --allow-releaseinfo-change is not understood in combination with the other options HOT 3
- Unsigned Repository stops script[Bug] HOT 18
- Installing octoprint fails due to "ValueError: HTML doctype missing or incorrect. Expected <!DOCTYPE html>." HOT 5
- ERROR: failed to update package list HOT 4
- [Bug] HOT 2
- Python --version shows 2.7.16 on fresh image? HOT 3
- [Bug] HOT 2
- [Bug] SSL certificate problem: certificate has expired HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from octoprint-upgrade-to-py3.