Use pip list to view the installed package names
Then use pip show package name, you can see where it is installed
Usually installed in the lib/site-packages directory under the python installation directory!
How does Python check its own default installation path of third-party libraries
python -m site
Without pip, Python is listed in Extract all installed software packages
In the python interactive interface, enter
help('modules')
According to the echo
Enter the specific module name to get the help information of this module
help('grpc')
Start the python command line and enter the following two lines of commands
import networkx
networkx.version
>>> import requests >>> requests.__version__ '2.19.1' >>> import datetime >>> datetime.__version__ Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: 'module' object has no attribute '__version__'
>>> help(requests) ... VERSION 2.19.1 AUTHOR Kenneth Reitz FILE d:\program files\python-3.7.0\lib\site-packages\requests\__init__.py ...
The pip list | grep package_name command displays and obtains the information of the installed package (package name and version number)
The pip show package_name command can display the relevant information of the installed package, including its installation path. In fact, packages are usually installed in the lib\site-packages directory under the python installation directory
The above is the detailed content of How to view the package directory installed by Python pip?. For more information, please follow other related articles on the PHP Chinese website!