安装 paddleocr 报错 gcc: error trying to exec ‘cc1‘: execvp: 没有那个文件或目录

2022-01-07 11:25:43 浏览数 (1)

安装 paddleocr

代码语言:javascript复制
pip install paddleocr -i https://pypi.tuna.tsinghua.edu.cn/simple

报错

代码语言:javascript复制
creating build/temp.linux-x86_64-3.8
creating build/temp.linux-x86_64-3.8/Levenshtein
gcc -pthread -B /opt/bdp/data01/anaconda3/envs/pp21/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/opt/bdp/data01/anaconda3/envs/pp21/include/python3.8 -c Levenshtein/_levenshtein.c -o build/temp.linux-x86_64-3.8/Levenshtein/_levenshtein.o
gcc: error trying to exec 'cc1': execvp: 没有那个文件或目录
error: command '/usr/local/bin/gcc' failed with exit code 1

centos linux下解决方法

把下面的东西都安装确认一遍就可以了

代码语言:javascript复制
sudo yum install python3-devel
sudo yum install gcc
sudo yum install gcc-c  
sudo yum install glibc-devel
sudo yum install cpp
sudo yum install binutils
sudo yum install mpfr
sudo yum install jemalloc

安装 paddleocr 成功

代码语言:javascript复制
Installing collected packages: pyclipper, premailer, opencv-contrib-python, lmdb, imgaug, fasttext, cython, paddleocr
Successfully installed cython-0.29.26 fasttext-0.9.1 imgaug-0.4.0 lmdb-1.2.1 opencv-contrib-python-4.4.0.46 paddleocr-2.3.0.2 premailer-3.10.0 pyclipper-1.3.0.post2

0 人点赞