Show what pip has installed in the current environment:
python3 -m pip listShow details for a specific package pip has installed:
python3 -m pip show <package name>Shows the modules Python can import in the current environment:
python3 -m pydoc modulesGet help for a specific module:
python3 -m pydoc modules <module name>Browse module documentation in a browser.
python3 -m pydoc -n <hostname>starts a server with a chosen host name.python3 -m pydoc -p <port>starts a server on a chosen port.python3 -m pydoc -bstarts a server on an unused port and opens the browser.
python3 -m pydoc -bShows the file path Python uses for a module. A path under your Python install directory usually means the standard library; a path under site-packages/ usually means a package installed with pip; a path in your project folder usually means a local module.
python3 -c "import <module name>; print(<module name>.__file__)"Example:
python3 -c "import http; print(http.__file__)"Shows where Python looks for modules:
python3 -c "import sys; print('\n'.join(sys.path))"Show contents of a package:
python3 -c "import <package name>, pkgutil; print('\n'.join(sorted(m.name for m in pkgutil.iter_modules(<package name>.__path__))))"Example:
python3 -c "import http, pkgutil; print('\n'.join(sorted(m.name for m in pkgutil.iter_modules(http.__path__))))"