📄 requirements.md

⬇️ 下载文件

依赖库安装说明

本Skill需要以下Python依赖库:

必需库

  • Pillow: 图片处理

    pip install pillow
    
  • pytesseract: OCR引擎

    pip install pytesseract
    
  • opencv-python: 图片预处理

    pip install opencv-python
    # 或者更轻量的版本
    pip install opencv-python-headless
    
  • numpy: 数值计算

    pip install numpy
    
  • pandas: 数据处理

    pip install pandas
    
  • openpyxl: Excel文件操作

    pip install openpyxl
    

快速安装(推荐)

一次性安装所有依赖:

pip install pillow pytesseract opencv-python numpy pandas openpyxl

Tesseract OCR引擎安装

pytesseract需要系统安装Tesseract OCR引擎:

Ubuntu/Debian

sudo apt-get install tesseract-ocr
sudo apt-get install tesseract-ocr-chi-sim  # 中文支持

CentOS/RHEL

sudo yum install tesseract
sudo yum install tesseract-langpack-chi_sim

macOS

brew install tesseract

Windows

https://github.com/UB-Mannheim/tesseract/wiki 下载安装程序

验证安装

import pytesseract
print(pytesseract.get_tesseract_version())

语言包

本Skill默认使用中文和英文混合识别(chi_sim+eng)。如果需要其他语言:

创建虚拟环境(推荐)

为了避免依赖冲突,建议使用虚拟环境:

python -m venv table_extractor_env
source table_extractor_env/bin/activate  # Linux/macOS
# 或
table_extractor_env\Scripts\activate     # Windows

pip install -r requirements.txt