It could be that the python version changed between the stretch and the buster image and that made things break in the virtual environment (it's somewhat isolated, but not fully isolated).
You could try recreating just the virtual environment and see if that fixes things.
In general the backup plugin + reflashing is the recommended way to migrate to new images.
Ok done
In the end I flashed a new image and migrated the settings as you suggested.
I thought even if I get the venv issues fixes there will maybe new ones in the future and it's not worth the trouble.
I'll mark this problem as solved
Ok I tested it.
I flashed the latest stable image ( 0.16.0 ), run the webinterface wizard and updated to the latest octoprint.
Then I dist-upgraded to buster.
After that the same arror as in my case - venv seems broken.
(oprint) pi@octopi:~ $ ~/oprint/bin/octoprint serve
Traceback (most recent call last):
File "/home/pi/oprint/bin/octoprint", line 6, in <module>
from pkg_resources import load_entry_point
File "/home/pi/oprint/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 74, in <module>
__import__('pkg_resources.extern.packaging.requirements')
File "/home/pi/oprint/local/lib/python2.7/site-packages/pkg_resources/extern/__init__.py", line 61, in load_module
"distribution.".format(**locals())
ImportError: The 'packaging.requirements' package is required; normally this is bundled with this package so if you get this warning, consult the packager of your distribution.
(oprint) pi@octopi:~ $
I have ran into the same problem
I have a Pi3 Raspbian Stretch with OctoPrint installed
I the Upgraded to Buster and now OctoPrint fails to start
UPDATE:
I had to rename the /home/pi/OctoPrint folder to /home/pi/OctoPrint.org
then I proceeded to follow Setting up OctoPrint on a Raspberry Pi running Raspbian
to rebuild the virtualenv venv
and Now OctoPrint is running on Buster via a Pi3
by the way Buster has been made Stable in the repo
Glad to hear you got a solution.
I thought before there are potential problems in the future like installing plugins fails or updating octoprint itself etc I'm safer if I just set up a clean fresh install.
it definitely does survive because update channel is still stretch.
the only thing which doesn't get updated is stretch kernel (because buster runs on 4.19.57-v7l+ while stretch is a previous version)
...oh... by the way...in this case, if you want to update the kernel/firmware (from github), you can do a sudo rpi-update
Oh man, wrong answer. As I've posted many times on the Internet and here, rpi-update should only be used by the people who are actually coding kernel drivers, for example, for Raspbian. It will pull from the next branch of Raspbian's repository rather than from master. It will often brick a Raspi, by the way.
Well it shouldn't be used for regular updates - that's right.
But if you want the new things from the next branch it's the thing you want do.
I only did it if I wanted the new branch and had never issues with it. That doesn't mean that others can't have issues. I'm just saying it went fine for me.
It very much depends upon your timing ("your mileage may vary"). There are nights when the build on a next/development branch result in something that really doesn't work. The wi-fi/ethernet stack didn't load the last time I tried this on a Raspi 3B, for what it's worth.
I see.
Yeah I had to use it when I got problems with the new wifi interface on the 3+ and the 0W.
But you're right we shouldn't use this for regular updates or fun. And if we use it we should at least backup the sd card.
I'm not sure about the pi 4. It got a SPI EEPROM and got some stuff in it. I have no idea if a rpi-update could brick the pi 4 semi-permanent. Also I don't know if that's the case if loading a new bootloader will flash the EEPROM and fix it.
When I say "brick" I mean "reflash that microSD, you've painted yourself into a corner".
About the only thing that can't be undone on a Raspi is when you tell it to boot from USB instead of microSD. There's no turning back from that stance because it does write to the EEPROM (OTP = one-time programmable memory).
Oh didn't know that you can change that permanent.
I know that the pi 3+ is able to boot from usb out of the box and that you can use program_usb_boot_mode=1 on the pi 3 - but I thought you had to keep your sd card in the pi so it can read this line and boot from usb.
I never questioned why there was program in the command
Thanks for the information
edit: there is a special bootloader for flashing the new pi 4 EEPROM and you also can flash things like usb firmware to it. That's what I thought could brick it when you use rpi-update and a bad firmware gets flashed to the EEPROM. And I don't think that this one is OTP because of the flashing bootloader.