# Python3 Upgrade routine with pip packages



## K^3 (Oct 16, 2017)

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.


----------



## xtaz (Oct 16, 2017)

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.


----------



## K^3 (Oct 21, 2017)

The --user option was completely new for me and it is what I searched for.


----------

