Python3 Upgrade routine with pip packages

Hey guys,

I have a jail which depends on Python3 with some packages I have installed via pip. With every major upgrade of Python3 I have to reinstall all packages via pip which itself has to be installed via '-m ensurepip'. Is there some better routine to upgrade Python3 as this is prone to mistakes? virtualenv is not really a solution in my case.
I'm guessing pip is installing things into /usr/local/lib/python3.6 which means when the version changes all of your pip things vanish. Probably little you can do about that other than manually copying things around or reinstalling them. Personally I use '--user' to keep things in ~/.local/ or '-m venv' to create a virtual environment, but you said you didn't want to use this as a solution.
  • Thanks
Reactions: K^3