刚开始学习python, 经常不知道安装了哪些包,及不知道包安装到哪里了
一. 查看安装了哪些包 : pip list
C:\Users\Thinkpad>pip list Package Version ---------- ------- asgiref 3.7.2 Django 4.2.3 pip 23.1.2 setuptools 65.5.0 sqlparse 0.4.4 tzdata 2023.3
二. 查看安装包的位置 : pip show 包名
C:\Users\Thinkpad>pip show Django Name: Django Version: 4.2.3 Summary: A high-level Python web framework that encourages rapid development and clean, pragmatic design. Home-page: https://www.djangoproject.com/ Author: Django Software Foundation Author-email: foundation@djangoproject.com License: BSD-3-Clause Location: E:\Program Files\Lib\site-packages Requires: asgiref, sqlparse, tzdata
三. 查看pip的配置文件地址:
pip -v config list For variant 'global', will try loading 'C:\ProgramData\pip\pip.ini' For variant 'user', will try loading 'C:\Users\Thinkpad\pip\pip.ini' For variant 'user', will try loading 'C:\Users\Thinkpad\AppData\Roaming\pip\pip.ini' For variant 'site', will try loading 'E:\Program Files\Python\Python311\pip.ini' global.index-url='https://pypi.tuna.tsinghua.edu.cn/simple'