Files
tldr/pages.zh/common/pip-install.md
2024-08-05 20:41:08 +05:30

25 lines
597 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# pip install
> 用于安装 Python 包。
> 更多信息:<https://pip.pypa.io>.
- 安装包:
`pip install {{包名}}`
- 安装指定版本的包:
`pip install {{包名}}=={{版本号}}`
- 通过指定的依赖文件安装(通常文件名是 requirements.txt
`pip install -r {{requirements.txt}}`
- 通过 URL 或源码存档文件安装(如 *.tar.gz 或 *.whl
`pip install --find-links {{url|存档文件}}`
- 在本地的项目路径下以开发模式editable安装通常是读取 pyproject.toml 或 setup.py 文件):
`pip install --editable {{.}}`