juncongmoo / itree

An Interval Tree Library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[bug] whl do not work on windows

Loongel opened this issue · comments

Hi juncongmoo,
I've install via pip install py_itree on windows python=3.9.7. it hrows an exception that the _itree module cannot be found.

Python 3.9.7 (default, Sep 16 2021, 16:59:28) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import itree
Traceback (most recent call last):
  File "xxxxx\lib\site-packages\itree\__init__.py", line 5, in <module>
    from . import _itree
ImportError: DLL load failed while importing _itree: CANNOT Found module。

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "xxxxx\lib\site-packages\itree\__init__.py", line 7, in <module>
    import _itree
ModuleNotFoundError: No module named '_itree'
>>> exit()
commented

Please check:

https://github.com/juncongmoo/itree#build-from-source-with-cmake

I tried it works in my Windows box.

commented

The problem here is that the windows wheels are built wrong, they link against python311.dll instead of their respective versions. For example py_itree-0.0.18-cp38-cp38-win_amd64.whl is for Python 3.8 win-x64 and should link to python38.dll, but it does not.

Looking at the github action ci script, at a quick glance it seems that it's supposed to build for all the different python versions but it fails to do that and uses python 3.11 instead for every build.

So currently the solution is either to use Python 3.11 or to build manually from scratch.