Install on Windows via PIP¶
Environmental preparation¶
1.1 PREQUISITES¶
Windows 7/8/10 Pro/Enterprise (64bit)
GPU version support CUDA 9.0/10.0/10.1/10.2/11.0,only support single card
Python version 2.7.15+/3.5.1+/3.6+/3.7+/3.8+ (64 bit)
pip version 20.2.2+ (64 bit)
1.2 How to check your environment¶
Confirm the local operating system and bit information
Confirm that the Python where you need to install PaddlePaddle is your expected location, because your computer may have multiple Python
where python
You need to confirm whether the version of Python meets the requirements
If you are using Python 2, use the following command to confirm that it is 2.7.15+
python --version
If you are using Python 3, use the following command to confirm that it is 3.5.1+/3.6/3.7/3.8
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+
If you are using Python 2
python -m ensurepip
python -m pip --version
If you are using Python 3
python3 -m ensurepip
python3 -m pip --version
You need to confirm that Python and pip are 64bit, and the processor architecture is x86_64(or called x64、Intel 64、AMD64). Currently, paddlepaddle does not support arm64 architecture. The first line below outputs “64bit”, and the second line outputs “x86_64”, “x64” or “AMD64”
If you are using Python 2
python -c "import platform;print(platform.architecture()[0]);print(platform.machine())"
If you are using Python 3
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 useQuick install script, for instructions please refer tohere。
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¶
If your computer doesn’t have NVIDIA® GPU, please install the CPU Version of PaddlePaddle
If your computer has NVIDIA® GPU, please make sure that the following conditions are met and install the GPU Version of PaddlePaddle
Installation Step¶
You can choose the following version of PaddlePaddle to start installation:
2.1 CPU Versoion of PaddlePaddle¶
If you are using Python 2
python -m pip install paddlepaddle -i https://mirror.baidu.com/pypi/simple
If you are using Python 3
python3 -m pip install paddlepaddle -i https://mirror.baidu.com/pypi/simple
2.2 GPU Version of PaddlePaddle¶
2.2.1 CUDA9.0 PaddlePaddle
If you are using Python 2
python -m pip install paddlepaddle-gpu==2.0.0.post90 -f https://paddlepaddle.org.cn/whl/stable.html
If you are using Python 3
python3 -m pip install paddlepaddle-gpu==2.0.0.post90 -f https://paddlepaddle.org.cn/whl/stable.html
2.2.2 CUDA10.0 PaddlePaddle
If you are using Python 2
python -m pip install paddlepaddle-gpu==2.0.0.post100 -f https://paddlepaddle.org.cn/whl/stable.html
If you are using Python 3
python3 -m pip install paddlepaddle-gpu==2.0.0.post100 -f https://paddlepaddle.org.cn/whl/stable.html
2.2.3 CUDA10.1 PaddlePaddle
If you are using Python 2
python -m pip install paddlepaddle-gpu==2.0.0.post101 -f https://paddlepaddle.org.cn/whl/stable.html
If you are using Python 3
python3 -m pip install paddlepaddle-gpu==2.0.0.post101 -f https://paddlepaddle.org.cn/whl/stable.html
2.2.4 CUDA10.2 PaddlePaddle
If you are using Python 2
python -m pip install paddlepaddle-gpu==2.0.0 -f https://paddlepaddle.org.cn/whl/stable.html
If you are using Python 3
python3 -m pip install paddlepaddle-gpu==2.0.0 -f https://paddlepaddle.org.cn/whl/stable.html
2.2.5 CUDA11.0 PaddlePaddle
If you are using Python 2
python -m pip install paddlepaddle-gpu==2.0.0.post110 -f https://paddlepaddle.org.cn/whl/stable.html
If you are using Python 3
python3 -m pip install paddlepaddle-gpu==2.0.0.post110 -f https://paddlepaddle.org.cn/whl/stable.html
Note:
If you want to install PaddlePaddle which support CUDA10.2 with cuDNN v7.4+,you can use the following command:
python -m pip install paddlepaddle-gpu==2.0.0 -f https://paddlepaddle.org.cn/whl/stable.html
The above commands install the avx
package by default. If you want to install the noavx
package, please use -f https://paddlepaddle.org.cn/whl/stable/noavx.html
. For example, to install PaddlePaddle that supports CUDA 10.2 with noavx, please use the following command:
python -m pip install paddlepaddle-gpu==2.0.0 -f https://paddlepaddle.org.cn/whl/stable/noavx.html
If you want to install the Paddle package built with tensorrt
, please use the following command:
python -m pip install paddlepaddle-gpu==[版本号] -f https://paddlepaddle.org.cn/whl/stable/tensorrt.html
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()
If PaddlePaddle is installed successfully!
appears, to verify that the installation was successful.
How to uninstall¶
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