Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't seem to work with Python 3.13 #1069

Closed
tprrt opened this issue Nov 20, 2024 · 11 comments · Fixed by #1084
Closed

Doesn't seem to work with Python 3.13 #1069

tprrt opened this issue Nov 20, 2024 · 11 comments · Fixed by #1084

Comments

@tprrt
Copy link

tprrt commented Nov 20, 2024

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()
@Kreijstal
Copy link

rip sentencepiece

@severinsimmler
Copy link

@taku910 Are you planning to release wheels for Python 3.13 and can we support you somehow?

@hxx221
Copy link

hxx221 commented Jan 9, 2025

not work in py3.13 when to fix this issue?thank you

@Kreijstal
Copy link

Okay, who is forking it, where is the repo, who is the new juicy mantainer? we have a repo... to mantain

@h-vetinari
Copy link
Contributor

h-vetinari commented Jan 10, 2025

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)

@arabyserv
Copy link

not work for python 3.13
please we need support

@dsnehitha
Copy link

i had issue installing sentencepiece on python 3.13.1 because of build wheels but conda-forge worked for me

@Sdreamtale
Copy link

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)
I don't know where to run”conda install -c conda-forge sentencepiece”.

@h-vetinari
Copy link
Contributor

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

@ricperry
Copy link

ricperry commented Mar 2, 2025

Using conda isn't an option for PyTorch+ROCm. We need default python 3.13 compatibility without having to jump through so many hoops.

Image

@h-vetinari
Copy link
Contributor

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 conda-forge/conda-forge.github.io#1923 forward.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants