Unable to upgrade OctoPrint

What is the problem?

Trying to upgrade from 1.5.3 to 1.9. But it fails.

What did you already try to solve it?

I upgraded pip from 9.x to 20.x

Have you tried running in safe mode?


Did running in safe mode solve the problem?


Systeminfo Bundle

browser.user_agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/114.0
connectivity.connection_ok: true
connectivity.enabled: true
connectivity.online: true
connectivity.resolution_check: octoprint.org
connectivity.resolution_ok: true
env.hardware.cores: 4
env.hardware.freq: 900
env.hardware.ram: 917020672
env.os.bits: 32
env.os.id: linux
env.os.platform: linux2
env.plugins.pi_support.model: Raspberry Pi 2 Model B Rev 1.1
env.plugins.pi_support.octopi_version: 0.15.1
env.plugins.pi_support.throttle_state: 0x0
env.python.pip: 20.3.4
env.python.version: 2.7.13
env.python.virtualenv: true
octoprint.safe_mode: false
octoprint.version: 1.5.3
printer.firmware: Malyan 3.5

Additional information about your setup

OctoPrint 1.5.3, OctoPi version ???, Monoprice Mini Select 2, Raspberry Pi 2, Firefox, Windows 10

I get the following error upgrading:

Collecting https://github.com/OctoPrint/OctoPrint/archive/1.9.0.zip
Downloading https://github.com/OctoPrint/OctoPrint/archive/1.9.0.zip (6.3 MB)
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
ERROR: Command errored out with exit status 1:
command: /home/pi/oprint/bin/python2 /home/pi/oprint/local/lib/python2.7/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmpvGLfA6
cwd: /tmp/pip-req-build-LJkRPu
Complete output (17 lines):
Traceback (most recent call last):
File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/_vendor/pep517/_in_process.py", line 280, in
File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/_vendor/pep517/_in_process.py", line 263, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/home/pi/oprint/local/lib/python2.7/site-packages/pip/_vendor/pep517/_in_process.py", line 114, in get_requires_for_build_wheel
return hook(config_settings)
File "/home/pi/oprint/local/lib/python2.7/site-packages/setuptools/build_meta.py", line 103, in get_requires_for_build_wheel
return _get_build_requires(config_settings)
File "/home/pi/oprint/local/lib/python2.7/site-packages/setuptools/build_meta.py", line 89, in _get_build_requires
File "/home/pi/oprint/local/lib/python2.7/site-packages/setuptools/build_meta.py", line 72, in _run_setup
exec(compile(code, file, 'exec'), locals())
File "setup.py", line 237
f"{update.spec}: latest {update.latest}, pypi: https://pypi.org/project/{update.name}/"
SyntaxError: invalid syntax

ERROR: Command errored out with exit status 1: /home/pi/oprint/bin/python2 /home/pi/oprint/local/lib/python2.7/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmpvGLfA6 $
Getting requirements to build wheel: finished with status 'error'

Hello @rgelb !

The OctoPi version you run is quite old (0.15.1).
It runs Python 2.7, OctoPrint 1.9.0 requires Python 3.

I recommend to do a backup of all the data you have and start all over with the recent OctoPi version of 1.0.0

1 Like

Is there no way to do this via upgrade process (e.g. pip or apg get)? This box has been running without change for 10 years and has lots of customizations that I've long forgotten about.

You can't install a new enough version of Python on OctoPi 0.15 using apt because it is too old. The latest version of Python you can get on Debian Stretch is 3.5, while OctoPrint needs 3.7 to run these days.

You could mess about with manually building a newer Python version, or upgrading your OS (if it's still on stretch, this could end up exploding) and then reinstalling OctoPrint and everything yourself - there are many changes you would have to make manually to do this because it is old. And in the end, it is easier to use OctoPrint's backup/restore feature & just start again with a fresh modern OS.

(Also - OctoPi 0.15.1 was only released 5 years ago, so you can't have been running it for 10.)

1 Like

You are right. Definitely not 10 years. I conflated having the printer for 10 years. The OctoPi I got at some point and have been upgrading it over time until the version I am running now.

I can't really get the latest OctoPi because it is not recommended to run on the RPi 2, which is what's running right now.

I guess I'll continue using it as is. The only reason i wanted to upgrade is because a plugin that I want to use requires a higher version of OctoPrint and Python 3.

I mean you can do it with a pi 2 - just don't use any really resource intensive plugins or a 4k webcam stream :wink: .
Try it on a new sd card so you can switch back any time :slight_smile:
Personally I would also overclock the Pi with the presets in raspi-config - but you might want to add better cooling if you do that.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.