Linux command
pip-list 命令
网络
复制后可按需替换文件名、目录或参数。
常用示例
List installed packages
pip list
List outdated packages
pip list --outdated
List in JSON format
pip list --format json
List user packages only
pip list --user
List editable packages
pip list --editable
List packages not required by others
pip list --not-required
Exclude a package from output
pip list --exclude [pip] --exclude [setuptools]
说明
pip list displays installed Python packages with their versions. Can filter by outdated, up-to-date, or editable packages. Supports multiple output formats including JSON for scripting.
参数
- -o, --outdated
- Show only outdated packages.
- -u, --uptodate
- Show only up-to-date packages.
- -e, --editable
- Show only editable packages.
- -l, --local
- Show only virtualenv packages.
- --user
- Show only user packages.
- --format _format_
- Output format (columns, freeze, json).
- --not-required
- Show packages not required by others.
- --exclude _pkg_
- Exclude specified package from output (can be repeated).
- --path _dir_
- Restrict to packages in specified installation path.
- --exclude-editable
- Exclude editable packages from output.
- --include-editable
- Include editable packages in output.
FAQ
What is the pip-list command used for?
pip list displays installed Python packages with their versions. Can filter by outdated, up-to-date, or editable packages. Supports multiple output formats including JSON for scripting.
How do I run a basic pip-list example?
Run `pip list` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -o, --outdated do in pip-list?
Show only outdated packages.