Doesn't seem to work with Python 3.13
The following issue occurs with Python 3.13, but no issues occur with Python 3.11:
>>> import sentencepiece as spm
Traceback (most recent call last):
File '<stdin>', line 1, in <module>
import sentencepiece as spm
File '/usr/lib/python3.13/site-packages/sentencepiece/__init__.py', line 10, in <module>
from . import _sentencepiece
ImportError: cannot import name '_sentencepiece' from partially initialized module 'sentencepiece' (most likely due to a circular import) (/usr/lib/python3.13/site-packages/sentencepiece/__init__.py)
>>> exit()
rip sentencepiece
@taku910 Are you planning to release wheels for Python 3.13 and can we support you somehow?
not work in py3.13 when to fix this issue?thank you
Okay, who is forking it, where is the repo, who is the new juicy mantainer? we have a repo... to mantain
You can install sentencepiece (tested to pass the test suite) for python 3.9-3.13 from conda-forge:
conda install -c conda-forge sentencepiece
(you can also use the compatible mamba installer or the next-gen pixi instead of conda)
not work for python 3.13 please we need support
i had issue installing sentencepiece on python 3.13.1 because of build wheels but conda-forge worked for me
You can install sentencepiece (tested to pass the test suite) for python 3.9-3.13 from conda-forge:
conda install -c conda-forge sentencepiece(you can also use the compatible
mambainstaller or the next-genpixiinstead ofconda) I don't know where to run”conda install -c conda-forge sentencepiece”.
I don't know where to run ”conda install -c conda-forge sentencepiece”.
Well, you need to install the tool called conda first (for example from here; or one of the equivalent tools that I mentioned, which also follow the same paradigm: mamba or pixi), then you can install packages from conda-forge. Here's a little primer on using mamba, for example
Using conda isn't an option for PyTorch+ROCm. We need default python 3.13 compatibility without having to jump through so many hoops.
Using conda isn't an option for PyTorch+ROCm.
You can pip install things into a conda-environment (e.g. install pytorch+ROCM into an env which contains sentencepiece). For rocm support, we'd like to provide that, feel free to help push https://github.com/conda-forge/conda-forge.github.io/issues/1923 forward.
In few months Python 3.14 will be released and here it doesn't even work on 3.13 yet.