Skip to content

Commit 9e547f0

Browse files
committed
[Docs] Add description on installation of optional dependencies (#3887)
* Add optional dependency installation description * Fix bug
1 parent b0bb5e2 commit 9e547f0

File tree

2 files changed

+33
-2
lines changed

2 files changed

+33
-2
lines changed

docs/installation/installation.en.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,24 @@ After installing PaddlePaddle (refer to the [PaddlePaddle Local Installation Tut
1717
> ❗ <b>Note</b>: Please ensure that PaddlePaddle is successfully installed before proceeding to the next step.
1818
1919
```bash
20+
# Only install the required dependencies (optional dependencies can be installed later as needed)
2021
pip install paddlex==3.0.0rc1
2122
```
2223

24+
You can install the optional dependencies as needed using the following method (For more details, please refer to [2.3 Selective Installation of Dependencies](#23-selective-installation-of-dependencies)):
25+
26+
Install all dependencies required for PaddleX "basic features":
27+
28+
```bash
29+
pip install "paddlex[base]==3.0.0rc1"
30+
```
31+
32+
Only install the dependencies required for a specific feature:
33+
34+
```bash
35+
pip install "paddlex[ocr]==3.0.0rc1"
36+
```
37+
2338
### 1.2 Plugin Installation Mode
2439
If your use case for PaddleX involves <b>custom development</b> (e.g. retraining models, fine-tuning models, customizing model structures, customizing inference codes, etc.), we recommend the more <b>powerful</b> plugin installation mode.
2540

@@ -235,8 +250,9 @@ If you are only focused on a specific feature of PaddleX and want to minimize th
235250

236251
```bash
237252
# For example, to install only the basic OCR features
253+
238254
# Install the precompiled wheel package
239-
pip install "/url/of/wheel[ocr]"
255+
pip install "paddlex[ocr]"
240256
# Install from source
241257
pip install -e ".[ocr]"
242258

docs/installation/installation.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,23 @@ PaddleX为您提供了两种安装模式:<b>Wheel包安装</b>和<b>插件安
1919
> ❗ 注:请务必保证 PaddlePaddle 安装成功,安装成功后,方可进行下一步。
2020
2121
```bash
22+
# 仅安装必须依赖(可以在之后按需安装可选依赖)
2223
pip install paddlex==3.0.0rc1
2324
```
2425

26+
通过如下方式可以安装所需的可选依赖(更多说明请参考 [2.3 选择性安装依赖](#23-选择性安装依赖)):
27+
28+
安装 PaddleX “基础功能”需要的全部依赖:
29+
30+
```bash
31+
pip install "paddlex[base]==3.0.0rc1"
32+
```
33+
34+
仅安装某项功能所需依赖:
35+
```bash
36+
pip install "paddlex[ocr]==3.0.0rc1"
37+
```
38+
2539
### 1.2 插件安装模式
2640
若您使用PaddleX的应用场景为<b>二次开发</b> (例如重新训练模型、微调模型、自定义模型结构、自定义推理代码等),那么推荐您使用<b>功能更加强大</b>的插件安装模式。
2741

@@ -236,8 +250,9 @@ PaddleX 的功能丰富,而不同的功能需要的依赖也不尽相同。将
236250

237251
```bash
238252
# 以仅安装 OCR 类基础功能为例
253+
239254
# 安装预编译的 wheel 包
240-
pip install "/url/of/wheel[ocr]"
255+
pip install "paddlex[ocr]"
241256
# 从源码安装
242257
pip install -e ".[ocr]"
243258

0 commit comments

Comments
 (0)