问题
I am doing an installation script that does a complete installation of a software with it's needed modules on an Ubuntu server where i import the pip module then check for installed packages then install what i need then i check for them again.
The problem is when i install the new packages changes are not reflected to the imported pip module in the same run.
I am using:
import pip
pip.get_installed_distributions()
so i want to know is there any way that i could possibly clear pip cache or refresh modules?
来源:https://stackoverflow.com/questions/29770229/refresh-pip-installed-packages