I've just upgraded my home server from Ubuntu Server 18.04 LTS to 20.04, which also comes with a new Python 3 version.
I'm (or was) running multiple Octoprint instances with a system user named "octoprint".
Each instance has its own virtual environment (venv), created with Python 3.6.x. Everything was running fine.
Now after the upgrade, I have a newer Python 3 version and it seems, I can't simply use the existing venvs, since the local
site-packages aren't installed for the new version.
I found the
--upgrade option for the
venv module/command and executed this for every venv, which seemed to work, since the config file inside the venv now says Python version is "3.8.x" instead of 3.6.x (sorry, I forgot the minor versions...).
But that doesn't seemed to solve the basic issue, that I don't have the necessary Python packages installed for thr new version.
Now I wonder, how to get all packages which are installed in the old directory to be installed in the new one? Simply copying seems like a bad idea, I guess.... I could install OctoPrint, but what about the plugins?
This seems overly complicated for a minor (Python) version upgrade. Is there a "officially" recommended way or tool/command to do this?