I want to migrate existing and working Octoprint installations to another system. Both run Ubuntu Linux, but the target system runs Python 3.11.x, while the existing system uses Python 3.8.x
Obviously I need to copy all the config files and other files that are not part of the Python virtualenv.
Then I wanted to get all the packages to install them on the target system (after creating a new virtualenv).
On the existing machine
$ source ~/venvs/octoprint1/bin/activate $ pip list --format=freeze > requirements.txt
On the target system
$ python3 -m venv ~/venvs/octoprint1 $ source ~/venvs/octoprint1/bin/activate $ pip install -r requirements.txt
This works for a short while but then I get an error
ERROR: Could not find a version that satisfies the requirement command-not-found==0.3 (from versions: none) ERROR: No matching distribution found for command-not-found==0.3
I also had issues with other Python software migrating this way, it seems exporting the package names and versions doesn't seem to work (sometimes?). Usually I end up install the software new. But since there are quite a lot of plugins I wanted somehow to carry them over to the new installation.
Is there a better or recommended way of doing this? I also tried
pip freeze, but that was even worse, because it creates sometimes URLs instead of package version numbers.