Bladeren bron

[Docs] Add description on installation of optional dependencies (#3887)

* Add optional dependency installation description

* Fix bug
Lin Manhui 6 maanden geleden
bovenliggende
commit
162507f0bf
2 gewijzigde bestanden met toevoegingen van 33 en 2 verwijderingen
  1. 17 1
      docs/installation/installation.en.md
  2. 16 1
      docs/installation/installation.md

+ 17 - 1
docs/installation/installation.en.md

@@ -17,9 +17,24 @@ After installing PaddlePaddle (refer to the [PaddlePaddle Local Installation Tut
 > ❗ <b>Note</b>: Please ensure that PaddlePaddle is successfully installed before proceeding to the next step.
 
 ```bash
+# Only install the required dependencies (optional dependencies can be installed later as needed)
 pip install paddlex==3.0.0rc1
 ```
 
+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)):
+
+Install all dependencies required for PaddleX "basic features":
+
+```bash
+pip install "paddlex[base]==3.0.0rc1"
+```
+
+Only install the dependencies required for a specific feature:
+
+```bash
+pip install "paddlex[ocr]==3.0.0rc1"
+```
+
 ### 1.2 Plugin Installation Mode
 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.
 
@@ -235,8 +250,9 @@ If you are only focused on a specific feature of PaddleX and want to minimize th
 
 ```bash
 # For example, to install only the basic OCR features
+
 # Install the precompiled wheel package
-pip install "/url/of/wheel[ocr]"
+pip install "paddlex[ocr]"
 # Install from source
 pip install -e ".[ocr]"
 

+ 16 - 1
docs/installation/installation.md

@@ -19,9 +19,23 @@ PaddleX为您提供了两种安装模式:<b>Wheel包安装</b>和<b>插件安
 > ❗ 注:请务必保证 PaddlePaddle 安装成功,安装成功后,方可进行下一步。
 
 ```bash
+# 仅安装必须依赖(可以在之后按需安装可选依赖)
 pip install paddlex==3.0.0rc1
 ```
 
+通过如下方式可以安装所需的可选依赖(更多说明请参考 [2.3 选择性安装依赖](#23-选择性安装依赖)):
+
+安装 PaddleX “基础功能”需要的全部依赖:
+
+```bash
+pip install "paddlex[base]==3.0.0rc1"
+```
+
+仅安装某项功能所需依赖:
+```bash
+pip install "paddlex[ocr]==3.0.0rc1"
+```
+
 ### 1.2 插件安装模式
 若您使用PaddleX的应用场景为<b>二次开发</b> (例如重新训练模型、微调模型、自定义模型结构、自定义推理代码等),那么推荐您使用<b>功能更加强大</b>的插件安装模式。
 
@@ -236,8 +250,9 @@ PaddleX 的功能丰富,而不同的功能需要的依赖也不尽相同。将
 
 ```bash
 # 以仅安装 OCR 类基础功能为例
+
 # 安装预编译的 wheel 包
-pip install "/url/of/wheel[ocr]"
+pip install "paddlex[ocr]"
 # 从源码安装
 pip install -e ".[ocr]"