I just started an installation of Octoprint on x86 debian (the machine runs constantly and is near the printer so I didn't want to dedicate a Pi to it), following the instructions at Setting up OctoPrint on a Raspberry Pi running Raspberry Pi OS (Debian)
However, I got an error at 'pip install pip --upgrade'
Traceback (most recent call last):
File "/usr/local/bin/pip", line 5, in
from pip._internal.cli.main import main
File "/home/adrian/.local/lib/python3.9/site-packages/pip/init.py", line 6
def main(args: Optional[List[str]] = None) -> int:
SyntaxError: invalid syntax
Initially very frustrating as this is all too often my experience of python : something has changed and there is an incompatibility between what's needed and what's installed. Usually I enter a world of hurt resulting in permanent damage to other bits of the system. I know venv is intended to stop this but for some bizarre reasons it's left to users to debug rather than being part of the installation script.
However, in this case it was an easy fix, for which I was very glad - the first 'pip' in that and the following commands needs to be the python3 one. On my debian system, which has both 2.7 and 3.9 installed, that needs to be invoked specifically as pip3
pip3 install pip --upgrade
pip3 install octoprint
After installing, it still fails because Octoprint isn't in Octoprint/venv/bin but it is on the path. So it runs just as