Bizarre Update warning

So just went to the plugin manager and this warning popped up. I have upgraded to Python3 and so it is weird it is complaining about too newer packages? Python3-pip is the latest version for buster.

apt-show-versions python3-pip
python3-pip:all/buster 18.1-5+rpt1 uptodate

Does the update manager need updating as well?

for completeness


browser.user_agent: Mozilla/5.0 (X11; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0
connectivity.connection_check: 1.1.1.1:53
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: 1200
env.hardware.ram: 914006016
env.os.bits: 32
env.os.id: linux
env.os.platform: linux
env.plugins.pi_support.model: Raspberry Pi 3 Model B Rev 1.2
env.plugins.pi_support.octopi_version: 0.17.0
env.plugins.pi_support.throttle_state: 0x0
env.python.pip: 18.1
env.python.version: 3.7.3
env.python.virtualenv: true
octoprint.safe_mode: false
octoprint.version: 1.7.0
printer.firmware: Marlin 2.0.7.2 (Nov 16 2020 22:50:35)
systeminfo.generator: systemapi

It may be the latest version that debian decided to make available via their package repository, but it definitely is not the latest version (that is currently 21.3.1). pip 18.1 was released on October 5th 2018.

The debian packages aren't relevant here either, as pip gets installed into the virtual environment (and can also be updated therein, as pointed out in the linked FAQ entry).

Yes I followed that faq. Which is why it is confusing.


pi@octopi:~ $  python3 upgrade.py
OctoPrint Upgrade to Py 3 (v2.2.1)

This script will move your existing OctoPrint configuration from Python 2 to Python 3
This script requires an internet connection and it will disrupt any ongoing print jobs.

It will install the latest version of OctoPrint and all plugins.
No configuration or other files will be overwritten

Press [enter] to continue or ctrl-c to quit

Checking system info...
Detected OctoPi version 0.17.0
Unable to parse Python version string. Please report to me the line below that has caused problems....
[]
Virtual environment is already Python 3, are you sure you need an upgrade?

If you'd rather upgrade a different virtual env, you can enter the full path here

So if I am upgraded to python3 why do I get that warning I am not running the required versions ?

Edit: And no .. upgrading pip3 from pip3 does not seem to work


pi@octopi:~ $ pip3 install pip3
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting pip3
Could not install packages due to an EnvironmentError: 404 Client Error: Not Found for url: https://pypi.org/simple/pip3/

or pip


pi@octopi:~ $ pip3 install pip
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already satisfied: pip in /usr/lib/python3/dist-packages (18.1)

You don't have the OctoPrint venv active.

source /home/pi/oprint/bin/activate

then

pip install -U pip

I thought the upgrade script also installs a current pip in the newly created venv, but @Charlie_Powell will have to confirm that.

Ahh ok. that seems to work


pi@octopi:~ $ source /home/pi/oprint/bin/activate
(oprint) pi@octopi:~ $ pip install -U pip
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Cache entry deserialization failed, entry ignored
Cache entry deserialization failed, entry ignored
Collecting pip
  Downloading https://files.pythonhosted.org/packages/a4/6d/6463d49a933f547439d6b5b98b46af8742cc03ae83543e4d7688c2420f8b/pip-21.3.1-py3-none-any.whl (1.7MB)
    100% |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 1.7MB 153kB/s 
Installing collected packages: pip
  Found existing installation: pip 18.1
    Uninstalling pip-18.1:
      Successfully uninstalled pip-18.1
Successfully installed pip-21.3.1

And restarted octoprint and the warning seems to have gone away but I still seem unable to update any plugins

All those Exclamation Triangles are saying Update not possible. Even for Octoprint itself ?

Oh wait. I selected advanded options and forced a cache update and now it allows me to update the spool manager plugin. Now checking for updates says it is all up to date.

I assume 0.18 is not stable yet then ?

OctoPi 0.18 is perfectly stable and has been since January of this year. You haven't updated your OctoPi to 0.18 however, you have migrated the Python virtual environment for OctoPrint on your OctoPi 0.17 from Python 2 to Python 3 via an upgrade script that should have installed a current pip version along side it as well, but apparently didn't. Why it didn't I cannot tell you, but maybe @Charlie_Powell can (who authored and maintains this script).

It doesn't update pip, it just runs python3 -m venv oprint, which would use the pip version bundled with Python 3.7.3

Although having said that, surely 0.17 comes with a newer version of pip than 18.1? I thought the minimum supported direct update version was from OctoPi 0.16?

It was, but that was taken from the version of pip shipped in the Python 2 venv (which gets updated during the OctoPi build).

Might make sense to include a pip update routine in the update script as that is also what runs on OctoPi builds, we never take the stuff that's deemed "latest" by Debian, it's too ancient.

So how exactly to change it now? I am on Python 3 that much is clear. But it does not allow me to update to 0.18 even from within the venv ? I don't even have python2 any more on the system so why does it still seem pinned to 0.17?

It is not possible to update in-place an OctoPi image. OctoPi is a pre-built OS image, so the only way to update that is to flash the new OS image to the SD card.

You don't need to update OctoPi - if you are using Python 3, and you keep pip & everything else up to date there's nothing else you can really gain from flashing the new image.

Ok. Well it all seems to be working as is, so I guess I will just wait till it prompts for another update itself.

Thanks for all your help.

1 Like

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