Lin Manhui 7 mēneši atpakaļ
vecāks
revīzija
1771c9fcca

+ 8 - 8
docs/installation/installation.en.md

@@ -17,7 +17,7 @@ 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
-pip install https://paddle-model-ecology.bj.bcebos.com/paddlex/whl/paddlex-3.0.0rc0-py3-none-any.whl[base]
+pip install "https://paddle-model-ecology.bj.bcebos.com/paddlex/whl/paddlex-3.0.0rc0-py3-none-any.whl[base]"
 ```
 
 ### 1.2 Plugin Installation Mode
@@ -111,7 +111,7 @@ If the plugin you need to install is `PaddleXXX`, after installing PaddlePaddle
 ```bash
 git clone https://github.com/PaddlePaddle/PaddleX.git
 cd PaddleX
-pip install -e .[base]
+pip install -e ".[base]"
 paddlex --install PaddleXXX
 ```
 
@@ -186,7 +186,7 @@ cd PaddleX
 
 # Install PaddleX whl
 # -e: Install in editable mode, so changes to the current project's code will directly affect the installed PaddleX Wheel
-pip install -e .[base]
+pip install -e ".[base]"
 ```
 
 * <b>If you choose plugin installation mode</b> and the plugin you need is named PaddleXXX (there can be multiple), execute the following commands:
@@ -196,7 +196,7 @@ cd PaddleX
 
 # Install PaddleX whl
 # -e: Install in editable mode, so changes to the current project's code will directly affect the installed PaddleX Wheel
-pip install -e .[base]
+pip install -e ".[base]"
 
 # Install PaddleX plugins
 paddlex --install PaddleXXX
@@ -239,19 +239,19 @@ Sure! Here's the English translation:
 
 ### 2.3 Selective Installation of Dependencies
 
-PaddleX offers a wide range of features, and different features require different dependencies. The features in PaddleX that can be used without installing plugins are categorized as "basic features." The official PaddleX Docker images have all dependencies required for these basic features preinstalled. Similarly, using the installation method introduced earlier—`pip install ...[base]`—will install all dependencies needed for the basic features.
+PaddleX offers a wide range of features, and different features require different dependencies. The features in PaddleX that can be used without installing plugins are categorized as "basic features." The official PaddleX Docker images have all dependencies required for these basic features preinstalled. Similarly, using the installation method introduced earlier—`pip install "...[base]"`—will install all dependencies needed for the basic features.
 
 If you are only focused on a specific feature of PaddleX and want to minimize the size of the installed dependencies, you can selectively install them by specifying a "dependency group":
 
 ```bash
 # For example, to install only the basic OCR features
 # Install the precompiled wheel package
-pip install /url/of/wheel[ocr]
+pip install "/url/of/wheel[ocr]"
 # Install from source
-pip install -e .[ocr]
+pip install -e ".[ocr]"
 
 # You can also specify multiple dependency groups at once
-pip install -e .[ocr,cv]
+pip install -e ".[ocr,cv]"
 ```
 
 PaddleX currently provides the following dependency groups:

+ 7 - 7
docs/installation/installation.md

@@ -19,7 +19,7 @@ PaddleX为您提供了两种安装模式:<b>Wheel包安装</b>和<b>插件安
 > ❗ 注:请务必保证 PaddlePaddle 安装成功,安装成功后,方可进行下一步。
 
 ```bash
-pip install https://paddle-model-ecology.bj.bcebos.com/paddlex/whl/paddlex-3.0.0rc0-py3-none-any.whl[base]
+pip install "https://paddle-model-ecology.bj.bcebos.com/paddlex/whl/paddlex-3.0.0rc0-py3-none-any.whl[base]"
 ```
 
 ### 1.2 插件安装模式
@@ -194,7 +194,7 @@ cd PaddleX
 
 # 安装 PaddleX whl
 # -e:以可编辑模式安装,当前项目的代码更改,都会直接作用到已经安装的 PaddleX Wheel
-pip install -e .[base]
+pip install -e ".[base]"
 ```
 <b>若您选择插件安装模式</b>,并且您需要的插件名称为 PaddleXXX(可以有多个),请执行以下命令:
 
@@ -203,7 +203,7 @@ cd PaddleX
 
 # 安装 PaddleX whl
 # -e:以可编辑模式安装,当前项目的代码更改,都会直接作用到已经安装的 PaddleX Wheel
-pip install -e .[base]
+pip install -e ".[base]"
 
 # 安装 PaddleX 插件
 paddlex --install PaddleXXX
@@ -237,17 +237,17 @@ All packages are installed.
 
 ### 2.3 选择性安装依赖
 
-PaddleX 的功能丰富,而不同的功能需要的依赖也不尽相同。将 PaddleX 中不需要安装插件即可使用的功能归类为“基础功能”。PaddleX 官方 Docker 镜像预置了基础功能所需的全部依赖;使用上文介绍的 `pip install ...[base]` 的安装方式也将安装基础功能需要的所有依赖。如果您只专注于 PaddleX 的某一项功能,且希望保持安装的依赖的体积尽可能小,可以通过指定“依赖组”的方式,选择性地安装依赖:
+PaddleX 的功能丰富,而不同的功能需要的依赖也不尽相同。将 PaddleX 中不需要安装插件即可使用的功能归类为“基础功能”。PaddleX 官方 Docker 镜像预置了基础功能所需的全部依赖;使用上文介绍的 `pip install "...[base]"` 的安装方式也将安装基础功能需要的所有依赖。如果您只专注于 PaddleX 的某一项功能,且希望保持安装的依赖的体积尽可能小,可以通过指定“依赖组”的方式,选择性地安装依赖:
 
 ```bash
 # 以仅安装 OCR 类基础功能为例
 # 安装预编译的 wheel 包
-pip install /url/of/wheel[ocr]
+pip install "/url/of/wheel[ocr]"
 # 从源码安装
-pip install -e .[ocr]
+pip install -e ".[ocr]"
 
 # 也可以同时指定多个依赖组
-pip install -e .[ocr,cv]
+pip install -e ".[ocr,cv]"
 ```
 
 PaddleX 目前提供如下依赖组:

+ 1 - 1
paddlex/utils/deps.py

@@ -159,7 +159,7 @@ def require_extra(extra, *, obj_name=None):
             msg = f"`{obj_name}` requires additional dependencies."
         else:
             msg = "Additional dependencies are required."
-        msg += f" To install them, run `pip install paddlex[{extra}]==<PADDLEX_VERSION>` if you’re installing `paddlex` from an index, or `pip install -e /path/to/PaddleX[{extra}]` if you’re installing `paddlex` locally."
+        msg += f' To install them, run `pip install "paddlex[{extra}]==<PADDLEX_VERSION>"` if you’re installing `paddlex` from an index, or `pip install -e "/path/to/PaddleX[{extra}]"` if you’re installing `paddlex` locally.'
         raise RuntimeError(msg)