1、安装Python的PDF处理库camelot
pip install camelot-py[cv]
2、处理cv报错(如果出现)
pip install opencv-python
3、处理报错:PyPDF2.errors.DeprecationError: PdfFileReader is deprecated and was removed in PyPDF2 3.0.0. Use PdfReader instead.(如果出现)
pip install PyPDF2==2.9
4、处理报错:RuntimeError: Please make sure that Ghostscript is installed(如果出现)
pip install ghostscript
5、部署ghostscript
下载地址(ghost官网)
(1)Windows选择前两个直接安装
(2)Linux选择最后一个直接源码安装:
tar -zxvf ghostscript-xxxx.tar.gz
cd ghostscript-xxxx
./configure --prefix=/usr
make all
make install
注:make install可能需要root权限执行,即sudo make install
6、关注+点赞+收藏