OctoPrint tells me it can't run an update due to my Python environment being outdated, what do I do now?

Starting with version 1.3.10, OctoPrint's built-in update mechanism will no longer allow to automatically update OctoPrint or any installed plugins if the underlying Python environment is older than some threshold, to reduce the likelihood of running into update issues in such outdated environments:

OctoPrint 1.7.0 and newer expects these minimum versions, which correspond to the environment found on OctoPi 0.16 or newer:

  • Python: 2.7.13
  • pip: 19.0.1
  • setuptools: 40.7.1

If your environment is outdated, you may still proceed following one of the following two options.

Option 1: Update your environment

If it's only your version of pip that is outdated, you can manually update it, see here for a guide on how to do this:

If Python and/or setuptools are outdated, you'll need to update Python and recreate the virtual environment you have OctoPrint installed in.

On OctoPi, the easiest way to achieve this is probably just creating a backup of OctoPrint's settings and data, flashing a current image and then restoring the backup.

In case of manual installs or if you prefer to do it the hard way, you'll need to

  1. install a new version of Python
  2. delete & recreate the virtual environment that OctoPrint is installed into
  3. reinstall OctoPrint into the virtual environment

This basically boils down to re-run the initial installation process.

Option 2: Apply the update manually

:raised_back_of_hand: This is really not recommended since you'll have to continue to do these steps for any following updates down the road - updating the environment is really the preferable solution here and should be easy to accomplish with the Backup plugin built into OctoPrint 1.3.10 and later. The likelihood of your install simply breaking in an outdated environment are extremely high!

To update OctoPrint manually via the command line, follow these instructions for OctoPi or in case of a manual install just install OctoPrint again following the same instructions you followed for initial setup, that will update it to the latest version.

To update any of the installed third party plugins manually, you just have to install the plugin's current version - either do this through OctoPrint's plugin manager if the plugin is on the repository by changing it to show you already installed plugins and then clicking "Reinstall" next to the plugin in question, upload a current plugin archive through the plugin manager, or do it manually from the command line using

  • OctoPi: ~/oprint/bin/pip install <url of your plugin archive>
  • manual install: /path/to/OctoPrint/venv/bin/pip install <url of your plugin archive>
2 Likes

I have a strange problem. I run the python upgrade script to get to the 1.7.0 - and all went well but I'm still unable to update anything due to unsupported environment.

This is what is showing in my software update tab:

  • Python: 2.7.13 (you have: 3.7.3)
  • pip: 19.0.1 (you have: 18.1)
  • setuptools: 40.7.1 (you have: 40.8.0)

Now it seem that the only problem is the pip and I tried the following to update it:

  • run sudo apt-get update and sudo apt-get upgrade
  • run this to upgrade update:sudo apt-get install python-pip

but I get response I get the below:

pi@octopi:~ $ sudo apt-get install python-pip
Reading package lists... Done
Building dependency tree
Reading state information... Done
python-pip is already the newest version (18.1-5+rpt1).
The following package was automatically installed and is no longer required:
  rpi-eeprom-images
Use 'sudo apt autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 6 not upgraded.

Any idea? how to upgarde pip to 19.0.1 ?

I really don't want to rerun the whole Octopie setup as a I spent loong time fiddling with my two camera setup to make it work properly. Don't want to go through this again and just update if possible.

There's a link in the guide above that explains how to update pip.

ok thanks the below worked

source ~/oprint/bin/activate
pip install --upgrade pip