diff --git a/docs/install/conda/linux-conda.md b/docs/install/conda/linux-conda.md index d4a64bb2ef8..a4d1ab499a5 100644 --- a/docs/install/conda/linux-conda.md +++ b/docs/install/conda/linux-conda.md @@ -15,7 +15,7 @@ #### 1.1.1 安装环境 -首先根据具体的 Python 版本创建 Anaconda 虚拟环境,PaddlePaddle 的 Anaconda 安装支持以下四种 Python 安装环境。 +首先根据具体的 Python 版本创建 Anaconda 虚拟环境,PaddlePaddle 的 Anaconda 安装支持以下 Python 安装环境。 如果您想使用的 python 版本为 3.6: @@ -42,6 +42,12 @@ conda create -n paddle_env python=3.8 conda create -n paddle_env python=3.9 ``` +如果您想使用的 python 版本为 3.10: + +``` +conda create -n paddle_env python=3.10 +``` + #### 1.1.2 进入 Anaconda 虚拟环境 @@ -62,10 +68,10 @@ conda activate paddle_env ``` -which python +which python3 ``` -根据您的环境,您可能需要将说明中所有命令行中的 python 替换为具体的 Python 路径 +根据您的环境,您可能需要将说明中所有命令行中的 python3 替换为具体的 Python 路径 @@ -74,7 +80,7 @@ which python 使用以下命令确认版本(Python 应对应 3.6/3.7/3.8/3.9) ``` -python --version +python3 --version ``` @@ -83,7 +89,7 @@ python --version 确认 Python 和 pip 是 64bit,并且处理器架构是 x86_64(或称作 x64、Intel 64、AMD64)架构。下面的第一行输出的是"64bit",第二行输出的是"x86_64(或 x64、AMD64)"即可: ``` -python -c "import platform;print(platform.architecture()[0]);print(platform.machine())" +python3 -c "import platform;print(platform.architecture()[0]);print(platform.machine())" ``` @@ -155,7 +161,7 @@ conda install paddlepaddle==2.4.0rc0 --channel https://mirrors.tuna.tsinghua.edu ## **三、验证安装** -安装完成后您可以使用 `python` 或 `python3` 进入 python 解释器,输入`import paddle` ,再输入 +安装完成后您可以使用 `python3` 进入 python 解释器,输入`import paddle` ,再输入 `paddle.utils.run_check()` 如果出现`PaddlePaddle is installed successfully!`,说明您已成功安装。 diff --git a/docs/install/conda/linux-conda_en.md b/docs/install/conda/linux-conda_en.md index a6128447dc9..81c4e56c113 100644 --- a/docs/install/conda/linux-conda_en.md +++ b/docs/install/conda/linux-conda_en.md @@ -16,7 +16,7 @@ Before performing PaddlePaddle installation, please make sure that your Anaconda #### 1.1.1 Create the Anaconda Virtual Environment -Create virtual environment First create the Anaconda virtual environment according to the specific Python version. The Anaconda installation of PaddlePaddle supports the following four Python installation environments. +Create virtual environment First create the Anaconda virtual environment according to the specific Python version. The Anaconda installation of PaddlePaddle supports the following Python installation environments. If you want to use python version 3.6: @@ -43,6 +43,12 @@ If you want to use python version 3.9: conda create -n paddle_env python=3.9 ``` +If you want to use python version 3.10: + +``` +conda create -n paddle_env python=3.10 +``` + #### 1.1.2 Enter the Anaconda Virtual Environment ``` @@ -57,12 +63,12 @@ Confirm that your conda virtual environment and the Python loaction which is pre #### 1.2.1 Confirm the installation path of python -Depending on your environment, you may need to replace python in all command lines in the instructions with specific Python path. +Depending on your environment, you may need to replace python3 in all command lines in the instructions with specific Python path. The command to get the Python path is: ``` -which python +which python3 ``` @@ -73,7 +79,7 @@ which python Use the following command to confirm it's version is 3.6/3.7/3.8/3.9 ``` -python --version +python3 --version ``` @@ -84,7 +90,7 @@ Confirm that Python and pip are 64bit, and the processor architecture is x86_64 ``` -python -c "import platform;print(platform.architecture()[0]);print(platform.machine())" +python3 -c "import platform;print(platform.architecture()[0]);print(platform.machine())" ``` @@ -157,6 +163,6 @@ You can refer to NVIDIA official documents for installation process and configur ## Verify installation -After the installation is complete, you can use `python` or `python3` to enter the Python interpreter and then use `import paddle` and `paddle.utils.run_check()` +After the installation is complete, you can use `python3` to enter the Python interpreter and then use `import paddle` and `paddle.utils.run_check()` If `PaddlePaddle is installed successfully!` appears, to verify that the installation was successful. diff --git a/docs/install/conda/macos-conda.md b/docs/install/conda/macos-conda.md index fcd8050a650..9aed5db76b4 100644 --- a/docs/install/conda/macos-conda.md +++ b/docs/install/conda/macos-conda.md @@ -13,7 +13,7 @@ #### 1.1.1 安装环境 -首先根据具体的 Python 版本创建 Anaconda 虚拟环境,PaddlePaddle 的 Anaconda 安装支持以下五种 Python 安装环境。 +首先根据具体的 Python 版本创建 Anaconda 虚拟环境,PaddlePaddle 的 Anaconda 安装支持以下 Python 安装环境。 如果您想使用的 python 版本为 3.6: @@ -40,6 +40,12 @@ conda create -n paddle_env python=3.8 conda create -n paddle_env python=3.9 ``` +如果您想使用的 python 版本为 3.10: + +``` +conda create -n paddle_env python=3.10 +``` + #### 1.1.2 进入 Anaconda 虚拟环境 @@ -59,10 +65,10 @@ conda activate paddle_env 输出 Python 路径的命令为: ``` -which python +which python3 ``` -根据您的环境,您可能需要将说明中所有命令行中的 python 替换为具体的 Python 路径 +根据您的环境,您可能需要将说明中所有命令行中的 python3 替换为具体的 Python 路径 @@ -71,7 +77,7 @@ which python 使用以下命令确认版本(Python 应对应 3.6/3.7/3.8/3.9) ``` -python --version +python3 --version ``` @@ -82,7 +88,7 @@ python --version ``` -python -c "import platform;print(platform.architecture()[0]);print(platform.machine())" +python3 -c "import platform;print(platform.architecture()[0]);print(platform.machine())" ``` @@ -114,7 +120,7 @@ python -c "import platform;print(platform.architecture()[0]);print(platform.mach ## **三、验证安装** -安装完成后您可以使用 `python` 或 `python3` 进入 python 解释器,输入`import paddle` ,再输入 +安装完成后您可以使用 `python3` 进入 python 解释器,输入`import paddle` ,再输入 `paddle.utils.run_check()` 如果出现`PaddlePaddle is installed successfully!`,说明您已成功安装。 diff --git a/docs/install/conda/macos-conda_en.md b/docs/install/conda/macos-conda_en.md index 56cffcc5b16..1b988a9f0d2 100644 --- a/docs/install/conda/macos-conda_en.md +++ b/docs/install/conda/macos-conda_en.md @@ -17,7 +17,7 @@ Before performing PaddlePaddle installation, please make sure that your Anaconda #### 1.1.1 Create the Anaconda Virtual Environment -Create virtual environment First create the Anaconda virtual environment according to the specific Python version. The Anaconda installation of PaddlePaddle supports the following four Python installation environments. +Create virtual environment First create the Anaconda virtual environment according to the specific Python version. The Anaconda installation of PaddlePaddle supports the following Python installation environments. If you want to use python version 3.6: @@ -44,6 +44,12 @@ If you want to use python version 3.9: conda create -n paddle_env python=3.9 ``` +If you want to use python version 3.10: + +``` +conda create -n paddle_env python=3.10 +``` + #### 1.1.2 Enter the Anaconda Virtual Environment @@ -60,12 +66,12 @@ Confirm that your conda virtual environment and the Python loaction which is pre #### 1.2.1 Confirm the installation path of python -Depending on your environment, you may need to replace python in all command lines in the instructions with specific Python path. +Depending on your environment, you may need to replace python3 in all command lines in the instructions with specific Python path. The command to get the Python path is: ``` -which python +which python3 ``` @@ -74,7 +80,7 @@ which python Use the following command to confirm it's version is 3.6/3.7/3.8/3.9 ``` -python --version +python3 --version ``` @@ -86,7 +92,7 @@ Confirm that Python and pip are 64bit, and the processor architecture is x86_64( ``` -python -c "import platform;print(platform.architecture()[0]);print(platform.machine())" +python3 -c "import platform;print(platform.architecture()[0]);print(platform.machine())" ``` @@ -121,6 +127,6 @@ conda config --set show_channel_urls yes ## Verify installation -After the installation is complete, you can use `python` or `python3` to enter the Python interpreter and then use `import paddle` and `paddle.utils.run_check()` +After the installation is complete, you can use `python3` to enter the Python interpreter and then use `import paddle` and `paddle.utils.run_check()` If `PaddlePaddle is installed successfully!` appears, to verify that the installation was successful. diff --git a/docs/install/conda/windows-conda.md b/docs/install/conda/windows-conda.md index e08fda606df..1555a98d924 100644 --- a/docs/install/conda/windows-conda.md +++ b/docs/install/conda/windows-conda.md @@ -15,7 +15,7 @@ #### 1.1.1 安装环境 -首先根据具体的 Python 版本创建 Anaconda 虚拟环境,PaddlePaddle 的 Anaconda 安装支持以下四种 Python 安装环境。 +首先根据具体的 Python 版本创建 Anaconda 虚拟环境,PaddlePaddle 的 Anaconda 安装支持以下 Python 安装环境。 如果您想使用的 python 版本为 3.6: @@ -42,6 +42,12 @@ conda create -n paddle_env python=3.8 conda create -n paddle_env python=3.9 ``` +如果您想使用的 python 版本为 3.10: + +``` +conda create -n paddle_env python=3.10 +``` + #### 1.1.2 进入 Anaconda 虚拟环境 diff --git a/docs/install/conda/windows-conda_en.md b/docs/install/conda/windows-conda_en.md index cca4dad3900..84209f1b6ab 100644 --- a/docs/install/conda/windows-conda_en.md +++ b/docs/install/conda/windows-conda_en.md @@ -18,7 +18,7 @@ Before performing PaddlePaddle installation, please make sure that your Anaconda #### 1.1.1 Create the Anaconda Virtual Environment -Create virtual environment First create the Anaconda virtual environment according to the specific Python version. The Anaconda installation of PaddlePaddle supports the following four Python installation environments. +Create virtual environment First create the Anaconda virtual environment according to the specific Python version. The Anaconda installation of PaddlePaddle supports the following Python installation environments. If you want to use python version 3.6: @@ -45,6 +45,12 @@ If you want to use python version 3.9: conda create -n paddle_env python=3.9 ``` +If you want to use python version 3.10: + +``` +conda create -n paddle_env python=3.10 +``` + #### 1.1.2 Enter the Anaconda Virtual Environment diff --git a/docs/install/pip/linux-pip.md b/docs/install/pip/linux-pip.md index d791993c77f..9d53dd647f8 100644 --- a/docs/install/pip/linux-pip.md +++ b/docs/install/pip/linux-pip.md @@ -1,6 +1,6 @@ # Linux 下的 PIP 安装 -The Python Package Index(PyPI)是 Python 的包管理器。本文档为你介绍 PyPI 安装方式,飞桨提供的 PyPI 安装包支持分布式训练(多机多卡)、TensorRT 推理功能;PyPI 下载详见 PyPI 官网(PyPI 官网设置链接:https://pypi.org/)。 +[The Python Package Index(PyPI)](https://pypi.org/)是 Python 的包管理器。本文档为你介绍 PyPI 安装方式,飞桨提供的 PyPI 安装包支持分布式训练(多机多卡)、TensorRT 推理功能。 ## 一、环境准备 @@ -8,12 +8,12 @@ The Python Package Index(PyPI)是 Python 的包管理器。本文档为你介绍 * **Linux 版本 (64 bit)** - * **CentOS 7 (GPU 版本支持 CUDA 10.1/10.2/11.1/11.2/11.6/11.7)** - * **Ubuntu 16.04/18.04/20.04/22.04 (GPU 版本支持 CUDA 10.1/10.2/11.1/11.2/11.6/11.7)** + * **CentOS 7** + * **Ubuntu 16.04/18.04/20.04/22.04** * **Python 版本 3.6/3.7/3.8/3.9/3.10 (64 bit)** -* **pip 或 pip3 版本 20.2.2 或更高版本 (64 bit)** +* **pip3 版本 20.2.2 或更高版本 (64 bit)** ### 1.2 如何查看您的环境 @@ -27,10 +27,10 @@ The Python Package Index(PyPI)是 Python 的包管理器。本文档为你介绍 * 确认需要安装 PaddlePaddle 的 Python 是您预期的位置,因为您计算机可能有多个 Python - * 根据您的环境您可能需要将说明中所有命令行中的 python 替换为具体的 Python 路径 + * 根据您的环境您可能需要将说明中所有命令行中的 python3 替换为具体的 Python 路径 ``` - which python + which python3 ``` @@ -38,16 +38,16 @@ The Python Package Index(PyPI)是 Python 的包管理器。本文档为你介绍 * 使用以下命令确认是 3.6/3.7/3.8/3.9/3.10 - python --version + python3 --version * 需要确认 pip 的版本是否满足要求,要求 pip 版本为 20.2.2 或更高版本 ``` - python -m ensurepip + python3 -m ensurepip ``` ``` - python -m pip --version + python3 -m pip --version ``` @@ -56,7 +56,7 @@ The Python Package Index(PyPI)是 Python 的包管理器。本文档为你介绍 ``` - python -c "import platform;print(platform.architecture()[0]);print(platform.machine())" + python3 -c "import platform;print(platform.architecture()[0]);print(platform.machine())" ``` @@ -69,8 +69,6 @@ The Python Package Index(PyPI)是 Python 的包管理器。本文档为你介绍 ## 二、开始安装 -本文档为您介绍 pip 安装方式 - ### 首先请选择您的版本 * 如果您的计算机没有 NVIDIA® GPU,请安装[CPU 版的 PaddlePaddle](#cpu) @@ -130,7 +128,7 @@ The Python Package Index(PyPI)是 Python 的包管理器。本文档为你介绍 ``` - python -m pip install paddlepaddle==2.4.0rc0 -i https://pypi.tuna.tsinghua.edu.cn/simple + python3 -m pip install paddlepaddle==2.4.0rc0 -i https://pypi.tuna.tsinghua.edu.cn/simple ``` @@ -142,7 +140,7 @@ The Python Package Index(PyPI)是 Python 的包管理器。本文档为你介绍 2.2.1 CUDA10.1 的 PaddlePaddle ``` - python -m pip install paddlepaddle-gpu==2.4.0rc0.post101 -f https://www.paddlepaddle.org.cn/whl/linux/mkl/avx/stable.html + python3 -m pip install paddlepaddle-gpu==2.4.0rc0.post101 -f https://www.paddlepaddle.org.cn/whl/linux/mkl/avx/stable.html ``` @@ -151,7 +149,7 @@ The Python Package Index(PyPI)是 Python 的包管理器。本文档为你介绍 ``` - python -m pip install paddlepaddle-gpu==2.4.0rc0 -i https://pypi.tuna.tsinghua.edu.cn/simple + python3 -m pip install paddlepaddle-gpu==2.4.0rc0 -i https://pypi.tuna.tsinghua.edu.cn/simple ``` @@ -159,7 +157,7 @@ The Python Package Index(PyPI)是 Python 的包管理器。本文档为你介绍 ``` - python -m pip install paddlepaddle-gpu==2.4.0rc0.post111 -f https://www.paddlepaddle.org.cn/whl/linux/mkl/avx/stable.html + python3 -m pip install paddlepaddle-gpu==2.4.0rc0.post111 -f https://www.paddlepaddle.org.cn/whl/linux/mkl/avx/stable.html ``` @@ -167,12 +165,12 @@ The Python Package Index(PyPI)是 Python 的包管理器。本文档为你介绍 cuDNN8.1.1: ``` - python -m pip install paddlepaddle-gpu==2.4.0rc0.post112 -f https://www.paddlepaddle.org.cn/whl/linux/mkl/avx/stable.html + python3 -m pip install paddlepaddle-gpu==2.4.0rc0.post112 -f https://www.paddlepaddle.org.cn/whl/linux/mkl/avx/stable.html ``` 如果你想使用 PaddleTensorRT 进行推理,cudnn8.2.1 与 TensorRT8.0.3.4 联编的安装包能够获得更优的推理性能,安装命令如下: ``` - python -m pip install paddlepaddle-gpu==2.4.0rc0.post112 -f https://www.paddlepaddle.org.cn/whl/linux/cuda11.2-cudnn8.2-tensorrt8.html + python3 -m pip install paddlepaddle-gpu==2.4.0rc0.post112 -f https://www.paddlepaddle.org.cn/whl/linux/cuda11.2-cudnn8.2-tensorrt8.html ``` @@ -180,14 +178,14 @@ The Python Package Index(PyPI)是 Python 的包管理器。本文档为你介绍 ``` - python -m pip install paddlepaddle-gpu==2.4.0rc0.post116 -f https://www.paddlepaddle.org.cn/whl/linux/mkl/avx/stable.html + python3 -m pip install paddlepaddle-gpu==2.4.0rc0.post116 -f https://www.paddlepaddle.org.cn/whl/linux/mkl/avx/stable.html ``` 2.2.6 CUDA11.7 的 PaddlePaddle ``` - python -m pip install paddlepaddle-gpu==2.4.0rc0.post117 -f https://www.paddlepaddle.org.cn/whl/linux/mkl/avx/stable.html + python3 -m pip install paddlepaddle-gpu==2.4.0rc0.post117 -f https://www.paddlepaddle.org.cn/whl/linux/mkl/avx/stable.html ``` @@ -195,41 +193,41 @@ The Python Package Index(PyPI)是 Python 的包管理器。本文档为你介绍 * 如果你使用的是安培架构的 GPU,推荐使用 CUDA11 以上。如果你使用的是非安培架构的 GPU,推荐使用 CUDA10.2,性能更优。 -* 请确认需要安装 PaddlePaddle 的 Python 是您预期的位置,因为您计算机可能有多个 Python。根据您的环境您可能需要将说明中所有命令行中的 python 替换为 python3 或者替换为具体的 Python 路径。 +* 请确认需要安装 PaddlePaddle 的 Python 是您预期的位置,因为您计算机可能有多个 Python。根据您的环境您可能需要将说明中所有命令行中的 python3 替换为具体的 Python 路径。 * 如果您需要使用清华源,可以通过以下命令 ``` - python -m pip install paddlepaddle-gpu==[版本号] -i https://pypi.tuna.tsinghua.edu.cn/simple + python3 -m pip install paddlepaddle-gpu==[版本号] -i https://pypi.tuna.tsinghua.edu.cn/simple ``` * 上述命令默认安装`avx`的包。如果你的机器不支持`avx`,需要安装`noavx`的 Paddle 包,可以通过以下命令安装,仅支持 python3.8: - 首先使用如下命令将 wheel 包下载到本地,再使用`python -m pip install [name].whl`本地安装([name]为 wheel 包名称): + 首先使用如下命令将 wheel 包下载到本地,再使用`python3 -m pip install [name].whl`本地安装([name]为 wheel 包名称): * cpu、mkl 版本 noavx 机器安装: ``` - python -m pip download paddlepaddle==2.4.0rc0 -f https://www.paddlepaddle.org.cn/whl/linux/mkl/noavx/stable.html --no-index --no-deps + python3 -m pip download paddlepaddle==2.4.0rc0 -f https://www.paddlepaddle.org.cn/whl/linux/mkl/noavx/stable.html --no-index --no-deps ``` * cpu、openblas 版本 noavx 机器安装: ``` - python -m pip download paddlepaddle==2.4.0rc0 -f https://www.paddlepaddle.org.cn/whl/linux/openblas/noavx/stable.html --no-index --no-deps + python3 -m pip download paddlepaddle==2.4.0rc0 -f https://www.paddlepaddle.org.cn/whl/linux/openblas/noavx/stable.html --no-index --no-deps ``` * gpu 版本 cuda10.1 noavx 机器安装: ``` - python -m pip download paddlepaddle-gpu==2.4.0rc0.post101 -f https://www.paddlepaddle.org.cn/whl/linux/mkl/noavx/stable.html --no-index --no-deps + python3 -m pip download paddlepaddle-gpu==2.4.0rc0.post101 -f https://www.paddlepaddle.org.cn/whl/linux/mkl/noavx/stable.html --no-index --no-deps ``` * gpu 版本 cuda10.2 noavx 机器安装: ``` - python -m pip download paddlepaddle-gpu==2.4.0rc0 -f https://www.paddlepaddle.org.cn/whl/linux/mkl/noavx/stable.html --no-index --no-deps + python3 -m pip download paddlepaddle-gpu==2.4.0rc0 -f https://www.paddlepaddle.org.cn/whl/linux/mkl/noavx/stable.html --no-index --no-deps ``` 判断你的机器是否支持`avx`,可以输入以下命令,如果输出中包含`avx`,则表示机器支持`avx` @@ -237,10 +235,10 @@ The Python Package Index(PyPI)是 Python 的包管理器。本文档为你介绍 cat /proc/cpuinfo | grep -i avx ``` -* 如果你想安装`avx`、`openblas`的 Paddle 包,可以通过以下命令将 wheel 包下载到本地,再使用`python -m pip install [name].whl`本地安装([name]为 wheel 包名称): +* 如果你想安装`avx`、`openblas`的 Paddle 包,可以通过以下命令将 wheel 包下载到本地,再使用`python3 -m pip install [name].whl`本地安装([name]为 wheel 包名称): ``` - python -m pip download paddlepaddle==2.4.0rc0 -f https://www.paddlepaddle.org.cn/whl/linux/openblas/avx/stable.html --no-index --no-deps + python3 -m pip download paddlepaddle==2.4.0rc0 -f https://www.paddlepaddle.org.cn/whl/linux/openblas/avx/stable.html --no-index --no-deps ``` @@ -248,7 +246,7 @@ The Python Package Index(PyPI)是 Python 的包管理器。本文档为你介绍 ## **三、验证安装** -安装完成后您可以使用 `python` 或 `python3` 进入 python 解释器,输入`import paddle` ,再输入 +安装完成后您可以使用 `python3` 进入 python 解释器,输入`import paddle` ,再输入 `paddle.utils.run_check()` 如果出现`PaddlePaddle is installed successfully!`,说明您已成功安装。 @@ -258,6 +256,6 @@ The Python Package Index(PyPI)是 Python 的包管理器。本文档为你介绍 请使用以下命令卸载 PaddlePaddle: -* **CPU 版本的 PaddlePaddle**: `python -m pip uninstall paddlepaddle` +* **CPU 版本的 PaddlePaddle**: `python3 -m pip uninstall paddlepaddle` -* **GPU 版本的 PaddlePaddle**: `python -m pip uninstall paddlepaddle-gpu` +* **GPU 版本的 PaddlePaddle**: `python3 -m pip uninstall paddlepaddle-gpu` diff --git a/docs/install/pip/linux-pip_en.md b/docs/install/pip/linux-pip_en.md index 221934d1a2b..f97b3e7892b 100644 --- a/docs/install/pip/linux-pip_en.md +++ b/docs/install/pip/linux-pip_en.md @@ -5,12 +5,12 @@ ### 1.1 PREQUISITES * **Linux Version (64 bit)** - * **CentOS 7 (GPUVersion Supports CUDA 10.1/10.2/11.1/11.2/11.6/11.7)** - * **Ubuntu 16.04/18.04/20.04/22.04 (GPUVersion Supports CUDA 10.1/10.2/11.1/11.2/11.6/11.7)** + * **CentOS 7** + * **Ubuntu 16.04/18.04/20.04/22.04** * **Python Version: 3.6/3.7/3.8/3.9/3.10 (64 bit)** -* **pip or pip3 Version 20.2.2 or above (64 bit)** +* **pip3 Version 20.2.2 or above (64 bit)** ### 1.2 How to check your environment @@ -27,7 +27,7 @@ * Use the following command to output Python path. Depending on the environment, you may need to replace Python in all command lines in the description with specific Python path ``` - which python + which python3 ``` @@ -36,17 +36,17 @@ * Use the following command to confirm that it is 3.6/3.7/3.8/3.9/3.10 - python --version + python3 --version * It is required to confirm whether the version of pip meets the requirements. The version of pip is required to be 20.2.2 or above ``` - python -m ensurepip + python3 -m ensurepip ``` ``` - python -m pip --version + python3 -m pip --version ``` @@ -54,7 +54,7 @@ * You need to confirm that Python and pip are 64bit, and the processor architecture is x86_64(or called x64、Intel 64、AMD64). The first line below outputs "64bit", and the second line outputs "x86_64", "x64" or "AMD64" ``` - python -c "import platform;print(platform.architecture()[0]);print(platform.machine())" + python3 -c "import platform;print(platform.architecture()[0]);print(platform.machine())" ``` @@ -67,8 +67,6 @@ ## INSTALLATION -If you installed Python via Homebrew or the Python website, `pip` was installed with it. If you installed Python 3.x, then you will be using the command `pip3`. - ### Choose CPU/GPU * If your computer doesn't have NVIDIA® GPU, please install [the CPU Version of PaddlePaddle](#cpu) @@ -135,7 +133,7 @@ You can choose the following version of PaddlePaddle to start installation: ``` - python -m pip install paddlepaddle==2.4.0rc0 -i https://pypi.tuna.tsinghua.edu.cn/simple + python3 -m pip install paddlepaddle==2.4.0rc0 -i https://pypi.tuna.tsinghua.edu.cn/simple ``` @@ -148,7 +146,7 @@ You can choose the following version of PaddlePaddle to start installation: ``` - python -m pip install paddlepaddle-gpu==2.4.0rc0.post101 -f https://www.paddlepaddle.org.cn/whl/linux/mkl/avx/stable.html + python3 -m pip install paddlepaddle-gpu==2.4.0rc0.post101 -f https://www.paddlepaddle.org.cn/whl/linux/mkl/avx/stable.html ``` @@ -157,14 +155,14 @@ You can choose the following version of PaddlePaddle to start installation: ``` - python -m pip install paddlepaddle-gpu==2.4.0rc0 -i https://pypi.tuna.tsinghua.edu.cn/simple + python3 -m pip install paddlepaddle-gpu==2.4.0rc0 -i https://pypi.tuna.tsinghua.edu.cn/simple ``` 2.2.3 If you are using CUDA 11.1 ``` - python -m pip install paddlepaddle-gpu==2.4.0rc0.post111 -f https://www.paddlepaddle.org.cn/whl/linux/mkl/avx/stable.html + python3 -m pip install paddlepaddle-gpu==2.4.0rc0.post111 -f https://www.paddlepaddle.org.cn/whl/linux/mkl/avx/stable.html ``` @@ -172,7 +170,7 @@ You can choose the following version of PaddlePaddle to start installation: ``` - python -m pip install paddlepaddle-gpu==2.4.0rc0.post112 -f https://www.paddlepaddle.org.cn/whl/linux/mkl/avx/stable.html + python3 -m pip install paddlepaddle-gpu==2.4.0rc0.post112 -f https://www.paddlepaddle.org.cn/whl/linux/mkl/avx/stable.html ``` @@ -180,55 +178,55 @@ You can choose the following version of PaddlePaddle to start installation: ``` - python -m pip install paddlepaddle-gpu==2.4.0rc0.post116 -f https://www.paddlepaddle.org.cn/whl/linux/mkl/avx/stable.html + python3 -m pip install paddlepaddle-gpu==2.4.0rc0.post116 -f https://www.paddlepaddle.org.cn/whl/linux/mkl/avx/stable.html ``` 2.2.6 If you are using CUDA 11.7 ``` - python -m pip install paddlepaddle-gpu==2.4.0rc0.post117 -f https://www.paddlepaddle.org.cn/whl/linux/mkl/avx/stable.html + python3 -m pip install paddlepaddle-gpu==2.4.0rc0.post117 -f https://www.paddlepaddle.org.cn/whl/linux/mkl/avx/stable.html ``` Note: * If you are using ampere-based GPU, CUDA 11 above version is recommended; otherwise CUDA 10.2 is recommended for better performance. -* Please confirm that the Python where you need to install PaddlePaddle is your expected location, because your computer may have multiple Python. Depending on the environment, you may need to replace Python in all command lines in the instructions with Python 3 or specific Python path. +* Please confirm that the Python where you need to install PaddlePaddle is your expected location, because your computer may have multiple Python. Depending on the environment, you may need to replace python3 in all command lines in the instructions with specific Python path. * If you want to use the tsinghua pypi, you can use the following command: ``` - python -m pip install paddlepaddle-gpu==[Version] -i https://pypi.tuna.tsinghua.edu.cn/simple + python3 -m pip install paddlepaddle-gpu==[Version] -i https://pypi.tuna.tsinghua.edu.cn/simple ``` * The above commands install the `avx` package by default. If your machine does not support `avx`, you need to install the Paddle package of `noavx`, you can use the following command to install,noavx version paddle wheel only support python3.8: - First use the following command to download the wheel package to the local, and then use `python -m pip install [name].whl` to install locally ([name] is the name of the wheel package): + First use the following command to download the wheel package to the local, and then use `python3 -m pip install [name].whl` to install locally ([name] is the name of the wheel package): * cpu and mkl version installed on noavx machine: ``` - python -m pip download paddlepaddle==2.4.0rc0 -f https://www.paddlepaddle.org.cn/whl/linux/mkl/noavx/stable.html --no-index --no-deps + python3 -m pip download paddlepaddle==2.4.0rc0 -f https://www.paddlepaddle.org.cn/whl/linux/mkl/noavx/stable.html --no-index --no-deps ``` * cpu and openblas version installed on noavx machine: ``` - python -m pip download paddlepaddle==2.4.0rc0 -f https://www.paddlepaddle.org.cn/whl/linux/openblas/noavx/stable.html --no-index --no-deps + python3 -m pip download paddlepaddle==2.4.0rc0 -f https://www.paddlepaddle.org.cn/whl/linux/openblas/noavx/stable.html --no-index --no-deps ``` * GPU cuda10.1 version install on noavx machine: ``` - python -m pip download paddlepaddle-gpu==2.4.0rc0.post101 -f https://www.paddlepaddle.org.cn/whl/linux/mkl/noavx/stable.html --no-index --no-deps + python3 -m pip download paddlepaddle-gpu==2.4.0rc0.post101 -f https://www.paddlepaddle.org.cn/whl/linux/mkl/noavx/stable.html --no-index --no-deps ``` * GPU cuda10.2 version install on noavx machine: ``` - python -m pip download paddlepaddle-gpu==2.4.0rc0 -f https://www.paddlepaddle.org.cn/whl/linux/mkl/noavx/stable.html --no-index --no-deps + python3 -m pip download paddlepaddle-gpu==2.4.0rc0 -f https://www.paddlepaddle.org.cn/whl/linux/mkl/noavx/stable.html --no-index --no-deps ``` To determine whether your machine supports `avx`, you can use the following command. If the output contains `avx`, it means that the machine supports `avx`: @@ -236,17 +234,17 @@ Note: cat /proc/cpuinfo | grep -i avx ``` -* If you want to install the Paddle package with `avx` and `openblas`, you can use the following command to download the wheel package to the local, and then use `python -m pip install [name].whl` to install locally ([name] is the name of the wheel package): +* If you want to install the Paddle package with `avx` and `openblas`, you can use the following command to download the wheel package to the local, and then use `python3 -m pip install [name].whl` to install locally ([name] is the name of the wheel package): ``` - python -m pip download paddlepaddle==2.4.0rc0 -f https://www.paddlepaddle.org.cn/whl/linux/openblas/avx/stable.html --no-index --no-deps + python3 -m pip download paddlepaddle==2.4.0rc0 -f https://www.paddlepaddle.org.cn/whl/linux/openblas/avx/stable.html --no-index --no-deps ``` ## Verify installation -After the installation is complete, you can use `python` or `python3` to enter the Python interpreter and then use `import paddle` and `paddle.utils.run_check()` +After the installation is complete, you can use `python3` to enter the Python interpreter and then use `import paddle` and `paddle.utils.run_check()` If `PaddlePaddle is installed successfully!` appears, to verify that the installation was successful. @@ -254,5 +252,5 @@ If `PaddlePaddle is installed successfully!` appears, to verify that the install Please use the following command to uninstall PaddlePaddle: -- **CPU version of PaddlePaddle**: `python -m pip uninstall paddlepaddle` -- **GPU version of PaddlePaddle**: `python -m pip uninstall paddlepaddle-gpu` +- **CPU version of PaddlePaddle**: `python3 -m pip uninstall paddlepaddle` +- **GPU version of PaddlePaddle**: `python3 -m pip uninstall paddlepaddle-gpu` diff --git a/docs/install/pip/macos-pip.md b/docs/install/pip/macos-pip.md index b40df5d36ea..4fe5ed0371a 100644 --- a/docs/install/pip/macos-pip.md +++ b/docs/install/pip/macos-pip.md @@ -27,7 +27,7 @@ The Python Package Index(PyPI)是 Python 的包管理器。本文档为你介绍 * 确认需要安装 PaddlePaddle 的 Python 是您预期的位置,因为您计算机可能有多个 Python - * 使用以下命令输出 Python 路径,根据的环境您可能需要将说明中所有命令行中的 python 替换为具体的 Python 路径 + * 使用以下命令输出 Python 路径,根据的环境您可能需要将说明中所有命令行中的 python3 替换为具体的 Python 路径 ``` which python @@ -40,18 +40,18 @@ The Python Package Index(PyPI)是 Python 的包管理器。本文档为你介绍 * 使用以下命令确认是 3.6/3.7/3.8/3.9/3.10 ``` - python --version + python3 --version ``` * 需要确认 pip 的版本是否满足要求,要求 pip 版本为 20.2.2 或更高版本 ``` - python -m ensurepip + python3 -m ensurepip ``` ``` - python -m pip --version + python3 -m pip --version ``` @@ -59,21 +59,17 @@ The Python Package Index(PyPI)是 Python 的包管理器。本文档为你介绍 * 需要确认 Python 和 pip 是 64bit,并且处理器架构是 x86_64(或称作 x64、Intel 64、AMD64)架构 或 arm64 架构(paddle 已原生支持 Mac M1 芯片): ``` - python -c "import platform;print(platform.architecture()[0]);print(platform.machine())" + python3 -c "import platform;print(platform.architecture()[0]);print(platform.machine())" ``` -* 默认提供的安装包需要计算机支持 MKL - * 如果您对机器环境不了解,请下载使用[快速安装脚本](https://fast-install.bj.bcebos.com/fast_install.sh),配套说明请参考[这里](https://github.com/PaddlePaddle/FluidDoc/tree/develop/doc/fluid/install/install_script.md)。 ## 二、开始安装 -本文档为您介绍 pip 安装方式 - ### 首先请选择您的版本 * 目前在 MacOS 环境仅支持 CPU 版 PaddlePaddle @@ -85,15 +81,31 @@ The Python Package Index(PyPI)是 Python 的包管理器。本文档为你介绍 ``` - python -m pip install paddlepaddle==2.4.0rc0 -i https://pypi.tuna.tsinghua.edu.cn/simple + python3 -m pip install paddlepaddle==2.4.0rc0 -i https://pypi.tuna.tsinghua.edu.cn/simple ``` 注: * MacOS 上您需要安装 unrar 以支持 PaddlePaddle,可以使用命令`brew install unrar` -* 请确认需要安装 PaddlePaddle 的 Python 是您预期的位置,因为您计算机可能有多个 Python。根据您的环境您可能需要将说明中所有命令行中的 python 替换为具体的 Python 路径。 +* 请确认需要安装 PaddlePaddle 的 Python 是您预期的位置,因为您计算机可能有多个 Python。根据您的环境您可能需要将说明中所有命令行中的 python3 替换为具体的 Python 路径。 * 默认下载最新稳定版的安装包,如需获取 develop 版本 nightly build 的安装包,请参考[这里](https://www.paddlepaddle.org.cn/install/quick/zh/1.8.5-windows-pip) * 使用 MacOS 中自带 Python 可能会导致安装失败。请使用[python 官网](https://www.python.org/downloads/mac-osx/)提供的 python3.6.x、python3.7.x、python3.8.x、python3.9.x、python3.10.x。 +* 上述命令默认安装`noavx`的包。如果你的机器支持`avx`,想要安装`avx`的 Paddle 包,可以通过以下命令安装: + + 首先使用如下命令将 wheel 包下载到本地,再使用`python3 -m pip install [name].whl`本地安装([name]为 wheel 包名称): + + ``` + python3 -m pip download paddlepaddle==2.4.0rc0 -f https://www.paddlepaddle.org.cn/whl/mac/openblas/avx/stable.html --no-index --no-deps + ``` + + 判断你的机器是否支持`avx`,可以输入以下命令,如果输出中包含`avx`,则表示机器支持`avx` + ``` + sysctl machdep.cpu.features | grep -i avx + ``` + 或 + ``` + sysctl machdep.cpu.leaf7_features | grep -i avx + ``` ## **三、验证安装** @@ -106,4 +118,4 @@ The Python Package Index(PyPI)是 Python 的包管理器。本文档为你介绍 请使用以下命令卸载 PaddlePaddle: -* `python -m pip uninstall paddlepaddle` +* `python3 -m pip uninstall paddlepaddle` diff --git a/docs/install/pip/macos-pip_en.md b/docs/install/pip/macos-pip_en.md index d7b2ba2c796..da3e5fcf675 100644 --- a/docs/install/pip/macos-pip_en.md +++ b/docs/install/pip/macos-pip_en.md @@ -25,10 +25,10 @@ * Confirm that the Python where you need to install PaddlePaddle is your expected location, because your computer may have multiple Python - * Use the following command to output Python path. Depending on the environment, you may need to replace Python in all command lines in the description with specific Python path + * Use the following command to output Python path. Depending on the environment, you may need to replace python3 in all command lines in the description with specific Python path ``` - which python + which python3 ``` @@ -37,16 +37,16 @@ * Use the following command to confirm that it is 3.6/3.7/3.8/3.9/3.10 - python --version + python3 --version * It is required to confirm whether the version of pip meets the requirements. The version of pip is required to be 20.2.2 or above ``` - python -m ensurepip + python3 -m ensurepip ``` ``` - python -m pip --version + python3 -m pip --version ``` @@ -54,20 +54,16 @@ ``` - python -c "import platform;print(platform.architecture()[0]);print(platform.machine())" + python3 -c "import platform;print(platform.architecture()[0]);print(platform.machine())" ``` -* The installation package provided by default requires computer support for MKL - * If you do not know the machine environment, please download and use[Quick install script](https://fast-install.bj.bcebos.com/fast_install.sh), for instructions please refer to[here](https://github.com/PaddlePaddle/FluidDoc/tree/develop/doc/fluid/install/install_script.md)。 ## INSTALLATION -If you installed Python via Homebrew or the Python website, `pip` was installed with it. If you installed Python 3.x, then you will be using the command `pip3`. We will introduce pip installation here. - ### Choose CPU/GPU * Currently, only the CPU version of PaddlePaddle is supported in the MacOS environment @@ -81,13 +77,29 @@ You can choose the following version of PaddlePaddle to start installation: ``` -python -m pip install paddlepaddle==2.4.0rc0 -i https://pypi.tuna.tsinghua.edu.cn/simple +python3 -m pip install paddlepaddle==2.4.0rc0 -i https://pypi.tuna.tsinghua.edu.cn/simple ``` Note: -* Please confirm that the Python where you need to install PaddlePaddle is your expected location, because your computer may have multiple Python. Depending on the environment, you may need to replace Python in all command lines in the instructions with specific Python path. +* Please confirm that the Python where you need to install PaddlePaddle is your expected location, because your computer may have multiple Python. Depending on the environment, you may need to replace python3 in all command lines in the instructions with specific Python path. +* The above commands install the `noavx` package by default. If your machine supports `avx`, and you want to install the Paddle package of `avx`, you can use the following command to install: + + First use the following command to download the wheel package to the local, and then use `python3 -m pip install [name].whl` to install locally ([name] is the name of the wheel package): + + ``` + python3 -m pip download paddlepaddle==2.4.0rc0 -f https://www.paddlepaddle.org.cn/whl/mac/openblas/avx/stable.html --no-index --no-deps + ``` + + To determine whether your machine supports `avx`, you can use the following command. If the output contains `avx`, it means that the machine supports `avx`: + ``` + sysctl machdep.cpu.features | grep -i avx + ``` + or + ``` + sysctl machdep.cpu.leaf7_features | grep -i avx + ``` @@ -102,5 +114,5 @@ If `PaddlePaddle is installed successfully!` appears, to verify that the install Please use the following command to uninstall PaddlePaddle: ``` -python -m pip uninstall paddlepaddle +python3 -m pip uninstall paddlepaddle ``` diff --git a/docs/install/pip/windows-pip.md b/docs/install/pip/windows-pip.md index 509c4a87eba..f904fd07320 100644 --- a/docs/install/pip/windows-pip.md +++ b/docs/install/pip/windows-pip.md @@ -1,6 +1,6 @@ # Windows 下的 PIP 安装 -The Python Package Index(PyPI)是 Python 的包管理器。本文档为你介绍 PyPI 安装方式,飞桨提供的 PyPI 安装包支持分布式训练(多机多卡)、TensorRT 推理功能;PyPI 下载详见 PyPI 官网(PyPI 官网设置链接:https://pypi.org/)。 +[The Python Package Index(PyPI)](https://pypi.org/)是 Python 的包管理器。本文档为你介绍 PyPI 安装方式,飞桨提供的 PyPI 安装包支持分布式训练(多机多卡)、TensorRT 推理功能。 ## 一、环境准备