location of python packages code example
Example 1: find location of library python linux
import module_name
print(module_name.__file__)
Example 2: python global site packages
python -m site
import module_name
print(module_name.__file__)
python -m site