segment-any-text / wtpsplit

Toolkit to segment text into sentences or other semantic units in a robust, efficient and adaptable way.
MIT License
666 stars 39 forks source link

Build Python 3.9 Wheels #25

Closed QuantumEntangledAndy closed 3 years ago

QuantumEntangledAndy commented 3 years ago

When trying to install into python3.9 it will not install a version later than 0.2.2. I am not certain but I believe that this is because wheels are only build for versions 3.6, 3.7 and 3.8. Would it be possible to add wheels for the 3.9 version?

bminixhofer commented 3 years ago

Hi, sorry about that! That is indeed the issue.

I'll build for Python 3.9 and release.

bminixhofer commented 3 years ago

Unfortunately onnxruntime does not yet support Python 3.9: https://github.com/microsoft/onnxruntime/issues/6125 and https://github.com/microsoft/onnxruntime/issues/5697.

They say:

The next release will be in late Feb. or early March.

So until then NNSplit can unfortunately not support Python 3.9. If you really want to use NNSplit with 3.9 I just manually built a wheel for Linux:

nnsplit-0.5.2_post0-cp39-cp39-manylinux2014_x86_64.zip

(rename it from .zip to .whl, GH issues doesn't let me upload wheels)

You'll have to also install the dev wheels for onnxruntime in that case: https://test.pypi.org/project/ort-nightly/#files

Also, to avoid confusion like in the original issue, I yanked version 0.2.2 and downwards of NNSplit since that was an old Python-only version that is not comparable to the current package.

bminixhofer commented 3 years ago

onnxruntime now has Python 3.9 wheels! So it was easy to fix now. As of Release 0.5.7, NNSplit supports Python 3.9.