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

Info about Python 3.13 compatibility #74

Open
4 tasks done
anthonywu opened this issue Oct 10, 2024 · 3 comments
Open
4 tasks done

Info about Python 3.13 compatibility #74

anthonywu opened this issue Oct 10, 2024 · 3 comments

Comments

@anthonywu
Copy link
Collaborator

anthonywu commented Oct 10, 2024

I expect people will use the newest Python 3.13 and try to install mflux and fail. Sharing the latest compat info that I gathered.

Known blockers

As of October 10, torch nightly builds shows *cp312-none-mac* as the latest matches. We need to wait for cp313-none-mac to be available then can test with pip install --pre torch --index-url https://download.pytorch.org/whl

  × No solution found when resolving dependencies:
  ╰─▶ Because only the following versions of torch are available:
          torch==1.0.0
... snipped ...
          torch==2.4.1
      and torch<=1.5.0 has no wheels with a matching Python implementation tag, we can conclude that torch<1.0.1 cannot be used.
      And because torch>=1.5.1 has no wheels with a matching Python ABI tag and you require torch, we can conclude that your requirements are unsatisfiable.

I expect torch to update within a month.


  • mlx's CircleCI configs needs to build and distribute wheels for 3.13

As of Oct 10, https://github.com/search?q=repo%3Aml-explore%2Fmlx%203.12&type=code shows 3.12 as the newest python versions accounted for.

  × No solution found when resolving dependencies:
  ╰─▶ Because mlx==0.18.0 has no wheels with a matching Python ABI tag and you require mlx==0.18.0, we can conclude that your requirements are unsatisfiable.

I have a local git clone of mlx that I compiled with python3.13 and I can get it to install, so I expect this to be resolved soon upstream.


other libraries

these other libraries do not pip install as of Oct 10, but I did not investigate how ready these upstream projects are for 3.13

Unknown blockers

there may be transitive dependencies that also need to distribute wheels for 3.13 before mflux project can advertise 3.13 support

@anthonywu
Copy link
Collaborator Author

ml-explore/mlx@9bd3a71 adds Python 3.13 to the CI, so am expecting a Python 3.13 mlx wheel in coming days.

@anthonywu
Copy link
Collaborator Author

solved (for devs to preview) in #90

  1. mlx is now available for 3.13
  2. tokenizers now has a new build for 3.13
  3. sentencepiece not upgraded but not required by tokenizers anymore after update
  4. torch preview builds via pip install --dev can be found on nightly builds (been available for at least a week)

Not good enough to close issue for now, but all developer types can be unblocked to move forward.

@anthonywu
Copy link
Collaborator Author

sentencepiece can be built from source and become pip installable by Python 3.13

the build instructions from the original repo works as is! https://github.com/google/sentencepiece/blob/master/python/README.md#build-and-install-sentencepiece

% git clone https://github.com/google/sentencepiece.git /your/path/sentencepiece
% cd sentencepiece
% mkdir build
% cd build
% cmake .. -DSPM_ENABLE_SHARED=OFF -DCMAKE_INSTALL_PREFIX=./root
% make install
% cd ../python
% python setup.py bdist_wheel
% pip install dist/sentencepiece*.whl

This produces an artifact to uv pip install /your/path/sentencepiece/python into the Python 3.13 env.

The trick is, can this be packaged reasonably for intermediate users while Google takes its time updating the 3.13 wheel for the library...

filipstrand added a commit that referenced this issue Nov 9, 2024
Issue #74 - python 3.13 pip install now working
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

No branches or pull requests

1 participant