use global python packages when possible

speed up installing python packages by reusing the global packages if exist