mirror of
https://github.com/tldr-pages/tldr.git
synced 2024-09-11 12:05:35 +03:00
pip, pip-install: add Chinese translation (#13244)
This commit is contained in:
parent
2f1af4058a
commit
cf3da06b07
24
pages.zh/common/pip-install.md
Normal file
24
pages.zh/common/pip-install.md
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
# 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 {{.}}`
|
32
pages.zh/common/pip.md
Normal file
32
pages.zh/common/pip.md
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
# pip
|
||||||
|
|
||||||
|
> Python 主流的包安装管理工具。
|
||||||
|
> 更多信息:<https://pip.pypa.io/>.
|
||||||
|
|
||||||
|
- 安装包(通过 `pip install` 查看更多安装示例):
|
||||||
|
|
||||||
|
`pip install {{包名}}`
|
||||||
|
|
||||||
|
- 安装包到用户目录而不是系统范围的默认位置:
|
||||||
|
|
||||||
|
`pip install --user {{包名}}`
|
||||||
|
|
||||||
|
- 升级包:
|
||||||
|
|
||||||
|
`pip install --upgrade {{包名}}`
|
||||||
|
|
||||||
|
- 卸载包:
|
||||||
|
|
||||||
|
`pip uninstall {{包名}}`
|
||||||
|
|
||||||
|
- 将已安装的包以 Requirements 的格式保存文件中:
|
||||||
|
|
||||||
|
`pip freeze > {{requirements.txt}}`
|
||||||
|
|
||||||
|
- 查看包的详细信息:
|
||||||
|
|
||||||
|
`pip show {{包名}}`
|
||||||
|
|
||||||
|
- 通过依赖文件(如 requirements.txt)来进行安装:
|
||||||
|
|
||||||
|
`pip install --requirement {{requirements.txt}}`
|
Loading…
Reference in New Issue
Block a user