Setting up OctoPrint on a Raspberry Pi running Raspberry Pi OS (Debian)

This works great on the OrangePi as well all you have to do is change pi to orangepi and that worked for me!

1 Like

Hello all - I'm fairly new to Raspberry Pi's, Linux, and Python, and was trying to set up OctoPrint when I ran into some issues. Everything was going smoothly up until pip install octoprint.

The download/installation was going swimmingly until it hit Babel (v. 2.12.1):

Collecting Babel<2.13,>=2.12.1 (from octoprint)
  Downloading https://www.piwheels.org/simple/babel/Babel-2.12.1-py3-none-any.whl (10.1 MB)
     ━━━━━━━━━━━━━╸━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.4/10.1 MB 254.5 kB/s eta 0:00:27
ERROR: THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE. If you have updated the package versions, please update the hashes. Otherwise, examine the package contents carefully; someone may have tampered with them.
    Babel<2.13,>=2.12.1 from https://www.piwheels.org/simple/babel/Babel-2.12.1-py3-none-any.whl#sha256=7d4b39b8f00d62b71bf643d554db2e99e2845fbdb69da9577dd7cb512e1da053 (from octoprint):
        Expected sha256 7d4b39b8f00d62b71bf643d554db2e99e2845fbdb69da9577dd7cb512e1da053
             Got        99a0e146b77343d833ef44a6b518b4e82be91b9c66ec244c9efd879085f21d56

It seems that the hashes don't match. Is this due to some sort of mismatched version? I can't figure it out. Hoping for a pro to help me out, and in the mean time I'm going to try and persuade ChatGPT to work it out :rofl:

That means something is wrong with the downloaded file.
Could be a transmission error or a failing SD card.
Delete it and try again

pinkrose@raspberrypi:~ $ /etc/systemd/system/octoprint.service
bash: /etc/systemd/system/octoprint.service: Permission denied

I've tried many different variations trying to give myself permission.
I can't get it. I'm the only user. Why can't I get to admin status?

The comment you've quoted is literally just typing in the file path, this will not do anything as it is not an executable command. To edit a file, you'd have to open a file editor such as nano with sudo nano /etc/.... You can't just type the file path in the console and expect it to know what to do with it.

Do you plan to append this tutorial with the installation of the new camera stack? It's a bit of a nightmare to install and I am stuck.

I have installed octoprint on a fresh install of Raspbian bookworm, everything works fine until you want to use the new stack instead of the old school mjpeg. I have installed the camera-streamer plugin, then the camera-streamer.deb but rip-camera still not working. It is extremely frustrating to not find all the needed information in one place.

It will probably be added when it becomes mainline in OctoPi. There's still a few issues with camera-streamer we were seeing (I'm not fully up to date with the status) that meant it has not become the default yet.

You should be able to use the instructions from ayufan/camera-streamer (github.com), using the precompiled deb from there. Instructions would not be "specific" to installing OctoPrint, it would be almost a copy of what's on there (or maybe a link, so this didn't become outdated).

If you're having issues getting it installed, open your own topic with as much detail as you can, so we can try and help you.

Nothing is working, I have lost 2 days trying to get it working with no luck. The instructions are evasive at best or they require dependencies not mentioned anywhere, it is a mess. I followed everything to the T and nothing works.

I am now trying to use Octopi stable from the official Raspberry imager but can't get the wifi nor the HDMI display to work... It's a massive waste of time. I think I will end up going back to the Raspbian and follow the above instruction including the webcam tricks for the rpi-cam.

IMO, it's time to abandon camera-streamer and find something / someone who is more responsive to fixing issues.

This is not the right place for this discussion, but camera-streamer is the easiest way to get an RPi Cam v3 up and running. The β€œnew stack” project got far more complex with removing the hardware encoder on the RPi 5. Find a better project, and propose it in its own topic.

Orange Pi Zero+, Armbian 24.5.1 Jammy Server / CLI . Error:

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for zeroconf
Building wheel for sgmllib3k (setup.py) ... done
Created wheel for sgmllib3k: filename=sgmllib3k-1.0.0-py3-none-any.whl size=6066 sha256=e7a97fd0817c15cd581bfd2ca1b64dd2acd299ba41cdd0e9256e308a83a6c1a6
Stored in directory: /home/octo/.cache/pip/wheels/f0/69/93/a47e9d621be168e9e33c7ce60524393c0b92ae83cf6c6e89c5
Successfully built future netifaces psutil sgmllib3k
Failed to build zeroconf
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (zeroconf)

My camera autostart didn't work. I did this:
cd
nano scripts/mjpg-streamer.sh


#!/bin/bash

cd /home/octoprint/mjpg-streamer/mjpg-streamer-experimental

LD_LIBRARY_PATH=.

./mjpg_streamer -i "./input_uvc.so" -o "./output_http.so"

sudo chmod +x /home/octoprint/scripts/mjpg-streamer.sh

sudo nano /etc/rc.local

You need to place the command to run the script before the exit 0 line:
home/octoprint/scripts/mjpg-streamer.sh

Thank you for the comprehensive walk-through!

Just wondering if it is possible for us to setup the new camera stack on PiOS. Would you be able to provide instructions for doing so?

Thanks again!

So I have been trying to set up OctoPrint on my new Raspberry Pi 5 running RaspberryPi OS Lite and everything installed fine, virtual environment activates okay but when I try and start it up using the "~/OctoPrint/venv/bin/octoprint serve" command through SSH it throws an uncaught exception

2025-04-18 15:08:10,502 - octoprint.startup - INFO - ****************************************************************************
2025-04-18 15:08:10,503 - octoprint.startup - INFO - Starting OctoPrint 1.10.3
2025-04-18 15:08:10,503 - octoprint.startup - INFO - Starting in SAFE MODE. Third party plugins will be disabled!
2025-04-18 15:08:10,503 - octoprint.startup - INFO - Reason for safe mode: problem during last startup
2025-04-18 15:08:10,503 - octoprint.startup - INFO - ****************************************************************************
2025-04-18 15:08:10,571 - octoprint.util.connectivity.connectivity_checker - INFO - Connectivity state is currently: onli
2025-04-18 15:08:10,571 - octoprint.util.connectivity.connectivity_checker - INFO - Connecting to 1.1.1.1:53 is working
2025-04-18 15:08:10,571 - octoprint.util.connectivity.connectivity_checker - INFO - Resolving octoprint.org is working
2025-04-18 15:08:10,574 - octoprint.plugin.core - INFO - Loading plugins from /home/Octo/OctoPrint/venv/lib/python3.11/si-packages/octoprint/plugins, /home/Octo/.octoprint/plugins and installed plugin packages...
2025-04-18 15:08:11,347 - octoprint.plugin.core - INFO - Found 20 plugin(s) providing 20 mixin implementations, 43 hook hdlers
2025-04-18 15:08:11,360 - octoprint.server.heartbeat - INFO - Starting server heartbeat, 900.0s interval
2025-04-18 15:08:11,384 - octoprint.cli.server - ERROR - Uncaught exception
Traceback (most recent call last):
  File "/home/Octo/OctoPrint/venv/bin/octoprint", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/Octo/OctoPrint/venv/lib/python3.11/site-packages/octoprint/__init__.py", line 1008, in main
    octo(args=args, prog_name="octoprint", auto_envvar_prefix="OCTOPRINT")
  File "/home/Octo/OctoPrint/venv/lib/python3.11/site-packages/click/core.py", line 1161, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/Octo/OctoPrint/venv/lib/python3.11/site-packages/click/core.py", line 1082, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/home/Octo/OctoPrint/venv/lib/python3.11/site-packages/click/core.py", line 1697, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/Octo/OctoPrint/venv/lib/python3.11/site-packages/click/core.py", line 1443, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/Octo/OctoPrint/venv/lib/python3.11/site-packages/click/core.py", line 788, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/Octo/OctoPrint/venv/lib/python3.11/site-packages/click/decorators.py", line 33, in new_func
    return f(get_current_context(), *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/Octo/OctoPrint/venv/lib/python3.11/site-packages/octoprint/cli/server.py", line 317, in serve_command
    run_server(
  File "/home/Octo/OctoPrint/venv/lib/python3.11/site-packages/octoprint/cli/server.py", line 163, in run_server
    octoprint_server.run()
  File "/home/Octo/OctoPrint/venv/lib/python3.11/site-packages/octoprint/server/__init__.py", line 389, in run
    self._setup_app(app)
  File "/home/Octo/OctoPrint/venv/lib/python3.11/site-packages/octoprint/server/__init__.py", line 1577, in _setup_app
    limiter = Limiter(
              ^^^^^^^^
  File "/home/Octo/OctoPrint/venv/lib/python3.11/site-packages/flask_limiter/extension.py", line 280, in __init__
    self.init_app(app)
  File "/home/Octo/OctoPrint/venv/lib/python3.11/site-packages/flask_limiter/extension.py", line 342, in init_app
    raise ConfigurationError(
limits.errors.ConfigurationError: Invalid rate limiting strategy fixed-window-elastic-expiry

I have googled the error and apparently its due to the "fixed-window-elastic-expiry" being deprecated within the limits library but everything is up to date with the most recent version of everything.
I am running Python3 version 3.11.2.

Have you used OctoPrint deploy?

See https://github.com/OctoPrint/OctoPrint/issues/5138 for a possible solution.

1 Like

I tried deploy initially but had no luck with it either so decided to just try this install instead

i'd do it if I could but don't think have the trust level...
Suggest an edit to bump the python versions listed at the beginning, or list that 3.7 and 3.8 are deprecated, will not be supported in the next version of this fine software

1 Like