本次安装记录的环境:
window7 64位
python: 3.8.15
pip:22.0.4
集成显卡
如果确认本机未支持没有 NVIDIA® GPU,可有跳过此步骤。
打开cmd,执行nvcc -V,如下图:
也请参考https://blog.csdn.net/kz_java/article/details/122067916 如何检测cuda和cudnn是否安装方法
在cmd 执行以下代码
python -c "import platform;print(platform.architecture()[0]);print(platform.machine())"
如有输出”x64”或”AMD64”即可,如图所示
使用cpu-z工具查看处理器指令集,判断是否支持avx,如如所示:
在cmd里执行安装命令
python -m pip install paddlepaddle==2.4.0 -i https://mirror.baidu.com/pypi/simple
或
python -m pip install paddlepaddle==2.4.0 -i https://pypi.tuna.tsinghua.edu.cn/simple
python -m pip install paddlepaddle-gpu==2.4.0 -i https://mirror.baidu.com/pypi/simple
或
python -m pip install paddlepaddle-gpu==2.4.0 -i https://pypi.tuna.tsinghua.edu.cn/simple
在cmd里执行以下命令,查看是否安装成功,如果出现PaddlePaddle is installed successfully!,说明您已成功安装。,如图所示
python -c "import paddle;paddle.utils.run_check()"
Running verify PaddlePaddle program ...
Traceback (most recent call last):
File "" , line 1, in <module>
File "K:\python\packages\Lib\site-packages\paddle\utils\install_check.py", lin
e 270, in run_check
_run_dygraph_single(use_cuda, use_xpu, use_npu)
File "K:\python\packages\Lib\site-packages\paddle\utils\install_check.py", lin
e 136, in _run_dygraph_single
linear_out = linear(input_tensor)
File "K:\python\packages\Lib\site-packages\paddle\fluid\dygraph\layers.py", li
ne 948, in __call__
return self.forward(*inputs, **kwargs)
File "K:\python\packages\Lib\site-packages\paddle\nn\layer\common.py", line 17
5, in forward
out = F.linear(
File "K:\python\packages\Lib\site-packages\paddle\nn\functional\common.py", li
ne 1882, in linear
return _C_ops.linear(x, weight, bias)
OSError: Invalid enum backend type `64`.
[C:\home\workspace\Paddle\paddle/phi/common/backend.h:140]
具体是什么原因暂时还未分析出来。所以最后安装成功是的paddlepaddle 2.3.2版本