One can import the package then consult its help
import statsmodels
help(sm)
At the very bottom of the help there is a section FILE that indicates where this package was installed.
This solution was tested with at least matplotlib (3.1.2) and statsmodels (0.11.1) (python 3.8.2).