举例:
第一步、首先在通过命令行安装pytest库
pip install pytest
第二步、通过pip show命令查看已安装库路径
pip show pytest
第三步、查看结果
root@7b78bb2edb99:/var/www/html/GovernmentManagement# pip show pytest
Name: pytest
Version: 8.1.1
Summary: pytest: simple powerful testing with Python
Home-page:
Author: Holger Krekel, Bruno Oliveira, Ronny Pfannschmidt, Floris Bruynooghe, Brianna Laugher, Florian Bruhin, Others (See AUTHORS)
Author-email:
License: MIT
Location: /usr/local/lib/python3.9/site-packages
Requires: exceptiongroup, iniconfig, packaging, pluggy, tomli
Required-by:
通过上面结果可以看出,pytest库所在路径为【/usr/local/lib/python3.9/site-packages】,可通过cd命令进入目录查看编辑