搭建Paddle环境(GPU版)

装这个PaddleOCR https://github/PaddlePaddle/PaddleOCR

大体上可以按照官网的流程来

过程中踩了一些坑:

1.先是pip过程中报这个错

building ‘Levenshtein._levenshtein’ extension
error: Microsoft Visual C*+ 14.0 or greater is required.bet it with 'llicrosoft C** Build Tools" : https:/visualstudiomicrosoft/visual-cpp-build-tools/

解决:直接下载对应的wheel文件安装(在这个网站找Archived: Python Extension Packages for Windows - Christoph Gohlke (uci.edu))

pip install lib_name

2.接下来,cuda的版本又不对了

RuntineErrar:(Preconditionotiret)The thirdh-party dynamic library (cudmno4 7.1) that Parble depends on is not confinunred conmeotly.(eror code is 1e)suggestions:
1.Check if the thind-party dynanic library (e.g.CUOA,CUDM)is installed conrectly and its version is matched mith padtepadrdle you installed ,2. Configure third-party dynamic library environment variables

官方给出的推荐环境:

  • PaddlePaddle >= 2.1.2
  • Python 3.7
  • CUDA 10.1 / CUDA 10.2
  • cuDNN 7.6

本机的显卡

参考此文章安装CUDA即cudnn
Win10卸载原有CUDA+安装新CUDA+cudnn_那记忆微凉的博客-CSDN博客_cuda 卸载

别忘了配完环境变量之后重启电脑


环境测试

import paddle

paddle.utils.run_check()

得到以上输出,说明环境搭建完毕。

更多推荐

搭建Paddle环境(GPU版)