Skip to content

Python 3.13 support: Missing pre-built wheels for Linux ARM64 #24

@drater05

Description

@drater05

Summary

Python 3.13 has no pre-built wheels, and user dictionary compilation fails even with system MeCab.

Environment

  • Python: 3.13.2
  • Platform: Linux ARM64 (Docker)
  • python-mecab-ko: 1.3.7

Issues

1. No Python 3.13 Wheels

RuntimeError: mecab-config not found

Latest release (July 2024) predates Python 3.13 (October 2024).

2. User Dictionary Compilation Fails

Even with apt-get install libmecab-dev, basic parsing works but dict-index fails:

dictionary.cpp(355) Context ID files may be broken

Comparison:

  • Python 3.12 (wheel): ✅ Works perfectly
  • Python 3.13 + apt mecab: ✅ Basic parsing, ❌ User dict
  • Python 3.13 + source mecab-ko: ✅ Everything works

Workaround

Build MeCab-ko 0.996-ko-0.9.2 from source before installing python-mecab-ko:

FROM python:3.13-slim

RUN apt-get update && apt-get install -y build-essential curl && rm -rf /var/lib/apt/lists/*

# Build MeCab-ko from source (same version as wheel build)
RUN cd /tmp && \
    curl -fsSL https://bitbucket.org/eunjeon/mecab-ko/downloads/mecab-0.996-ko-0.9.2.tar.gz | tar xz && \
    cd mecab-0.996-ko-0.9.2 && \
    # Update config for ARM64 support
    curl -fsSL "http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD" -o config.guess && \
    curl -fsSL "http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD" -o config.sub && \
    chmod +x config.* && \
    ./configure --enable-utf8-only && make -j$(nproc) && make install && ldconfig && \
    cd /tmp && rm -rf mecab*

RUN pip install python-mecab-ko python-mecab-ko-dic

Request

Please publish Python 3.13 wheels in the next release.


한국어 요약

문제:

  1. Python 3.13용 wheel이 없어서 설치 실패
  2. 시스템 MeCab으로는 기본 파싱은 되지만 사용자 사전 컴파일 실패

원인:

  • 최신 릴리스(2024년 7월)가 Python 3.13 출시(2024년 10월) 이전
  • 시스템 MeCab에 dictionary.cpp 버그 존재
  • Python 3.12 wheel에는 수정된 버전 포함

해결:

  • MeCab-ko 0.996-ko-0.9.2를 소스에서 직접 빌드
  • --enable-utf8-only 플래그 사용
  • ARM64 지원을 위해 config.guess/config.sub 업데이트 필요

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions