网上试过很多方法没有解决,最后发现是pip版本不兼容问题,解决方法:
// 查看pip版本
pip -V
// 查看pip版本
pip -V
我的pip 是22.2版,按照paddle官网操作说明安装gpu版本PaddlePaddle
此时出现错误如标题。
用如下命令将pip版本回退到21.2
python -m pip install pip==21.2
python -m pip install pip==21.2
再次运行 paddle官网安装命令,即可成功安装。
安装后验证可输入如下命令
>>> import paddle
//查看版本
>>> paddle.__version__
'2.3.2'
>>> paddle.utils.run_check()
Running verify PaddlePaddle program ...
W0826 20:05:33.974257 7424 gpu_resources.cc:61] Please NOTE: device: 0, GPU Compute Capability: 8.6, Driver API Version: 11.6, Runtime API Version: 11.6
W0826 20:05:34.137256 7424 gpu_resources.cc:91] device: 0, cuDNN Version: 8.2.
PaddlePaddle works well on 1 GPU.
PaddlePaddle works well on 1 GPUs.
PaddlePaddle is installed successfully! Let's start deep learning with PaddlePaddle now.
>>> import paddle
//查看版本
>>> paddle.__version__
'2.3.2'
>>> paddle.utils.run_check()
Running verify PaddlePaddle program ...
W0826 20:05:33.974257 7424 gpu_resources.cc:61] Please NOTE: device: 0, GPU Compute Capability: 8.6, Driver API Version: 11.6, Runtime API Version: 11.6
W0826 20:05:34.137256 7424 gpu_resources.cc:91] device: 0, cuDNN Version: 8.2.
PaddlePaddle works well on 1 GPU.
PaddlePaddle works well on 1 GPUs.
PaddlePaddle is installed successfully! Let's start deep learning with PaddlePaddle now.