Skip to content

Incompability to Python3.13 #274

Open

Description

@freinold

I'm working with the GLiNER library and noticed it lists sentencepiece as a dependency.
However, after searching through the codebase, I can't find any place where sentencepiece is actually imported or used.

This is a problem because sentencepiece is basically unmaintained at this point and has multiple open issues with compatibility on recent Python versions and various operating systems (see google/sentencepiece).
Specifically, I want to upgrade my project to Python 3.13, but sentencepiece currently doesn't work with this version and is blocking the upgrade.

Question:
Is sentencepiece still required for GLiNER to function, or can it be removed from the dependencies? If it’s not strictly needed anymore, it would be better to drop it to avoid downstream breakage and allow users to upgrade Python safely.

Let me know if you need logs or further info.

Activity

  1. freinold commented on Jul 13, 2025

    @freinold
    Author

    Sentencepiece is not a hard dependency of transformers any more as I just found out, see huggingface/transformers#39091

  2. ceteri commented on Aug 4, 2025

    @ceteri

    This has become a show stopper for trying to install on later versions of Python, e.g., using poetry, etc.

  3. changed the title [-]Incompability to Python3.13 due to `sentencepiece` dependency[/-] [+]Incompability to Python3.13[/+] on Aug 15, 2025
  4. freinold commented on Aug 15, 2025

    @freinold
    Author

    sentencepiece is now available for Python 3.13.

    But the dependency python-mecab-ko from the extra tokenizers currently doesn't build on 3.13 on my system (Win10/x64)

    @Ingvarstep are you generally tackling 3.13 soon as you're currently doing a lot of changes to the project?

  5. added
    bug
    on Sep 4, 2026
  6. self-assigned this
    on Sep 4, 2026
  7. Ingvarstep commented on Sep 5, 2026

    @Ingvarstep
    Collaborator

    Alternatively, python-mecab-ko stanza can be used; it works with newer versions of Python.

  8. removed
    bug
    on Sep 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions