配置paddleocr及paddlepaddle解决报错 GLIBCXX_3.4.30 FreeTypeFont

配置

https://github.com/PaddlePaddle/PaddleOCR/blob/release/2.7/StyleText/README_ch.md#style-text

  1. 环境配置
    https://www.paddlepaddle.org.cn/
    根据自己的cuda版本选择paddlepaddle-gpu
bash 复制代码
# 新建conda环境
# python version
conda create -n paddle python==3.8
# 安装paddlepaddle   
python -m pip install paddlepaddle-gpu==2.5.1.post120 -f https://www.paddlepaddle.org.cn/whl/linux/mkl/avx/stable.html

# paddleocr
git clone https://github.com/PaddlePaddle/PaddleOCR
cd PaddleOCR
pip3 install -r requirements.txt
  1. 报错

anaconda环境version `GLIBCXX_3.4.30' not found

attributeerror: 'FreeTypeFont' object has no attribute 'getsize'

bash 复制代码
pip uninstall Pillow
pip install Pillow==9.5
  1. 使用
bash 复制代码
conda activate paddle
cd PaddleOCR/StyleText

# 单张 
python3 tools/synth_image.py -c configs/config.yml --style_image examples/style_images/1_27RL.png --text_corpus PaddleOCR --language en

# 批量
python3 tools/synth_dataset.py -c configs/dataset_config.yml
相关推荐
孤烟42 分钟前
19 万 + GitHub 星标!OpenClaw 凭什么成为 2026 最火 AI Agent,万字实测告诉你
人工智能
zhl771 小时前
YOLOv5:从0搭建你的第一个目标检测模型
人工智能
TechFind1 小时前
用 OpenClaw 搭建企业微信 AI Agent:从零到自动化客服只需 30 分钟
人工智能·agent
FishCoderh1 小时前
OpenClaw部署后Tools工具权限被禁用?一行配置解决
人工智能
飞哥数智坊3 小时前
openclaw 不是全站第一!但它的爆发,足以引人深思
人工智能
zone77394 小时前
001:LangChain的LCEL语法学习
人工智能·后端·面试
程序员鱼皮4 小时前
微软竟然出了免费的 AI 应用开发课?!我已经学上了
人工智能·程序员·ai编程
DevnullCoffe5 小时前
基于 OpenClaw + Pangolinfo API 的 Amazon 价格监控系统:架构设计与最佳实践
人工智能·架构
Baihai_IDP5 小时前
回头看 RLHF、PPO、DPO、GRPO 与 RLVR 的发展路径
人工智能·llm·强化学习
aristotle5 小时前
Openclow安装保姆级教程
人工智能·程序员