Find all packages installed with easy_install/pip?
Find all packages installed with easy_install/pip?
pip freeze can output a listing of put in packages and their versions. It additionally permits you to write down those packages to a file that may later be wont to created a replacement atmosphere.
If anyone is curious you’ll use the ‘pip show’ command.
pip show [options] <package>
This will list the install directory of the given package in python.
Here the pip.get_installed_distributions() will give a list of installed packages as shown
import pip from os.path import join for package in pip.get_installed_distributions(): print(package.location) # you can exclude packages that's in /usr/XXX print(join(package.location, package._get_metadata("top_level.txt"))) # root directory of this package