apache / datafusion

Apache DataFusion SQL Query Engine
https://datafusion.apache.org/
Apache License 2.0
5.47k stars 1.01k forks source link

cannot import datafusion-37.1.0 in python 3.8 of windows 7 x64 #10513

Open l1t1 opened 1 month ago

l1t1 commented 1 month ago

Describe the bug

I upgrade to the version 37.1.0 and cannot import it in python.

To Reproduce

D:\>pip install datafusion -U
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Requirement already satisfied: datafusion in d:\python38\lib\site-packages (36.0.0)
Collecting datafusion
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/90/7e/09877d816952ff90f2bdcd49c45b199e20b226708068fa6a5bfb7d8ed51a/datafusion-37.1.0-cp38-abi3-win_amd64.whl (16.8 MB)
     ---------------------------------------- 16.8/16.8 MB 40.9 MB/s eta 0:00:00
Requirement already satisfied: pyarrow>=11.0.0 in d:\python38\lib\site-packages (from datafusion) (15.0.0)
Requirement already satisfied: numpy<2,>=1.16.6 in d:\python38\lib\site-packages (from pyarrow>=11.0.0->datafusion) (1.21.0)
Installing collected packages: datafusion
  Attempting uninstall: datafusion
    Found existing installation: datafusion 36.0.0
    Uninstalling datafusion-36.0.0:
      Successfully uninstalled datafusion-36.0.0
Successfully installed datafusion-37.1.0

D:\>python
Python 3.8.8 (tags/v3.8.8:024d805, Feb 19 2021, 13:18:16) [MSC v.1928 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import datafusion
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "D:\Python38\lib\site-packages\datafusion\__init__.py", line 28, in <module>
    from ._internal import (
ImportError: DLL load failed while importing _internal: 找不到指定的程序。

downgrade to 36.0.0 works

D:\>pip install datafusion==36.0.0
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting datafusion==36.0.0
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/21/76/8a541e24e225ae5a821fbdcd68b48d00cbbbce0674f1d6aa3cb5a9dadeac/datafusion-36.0.0-cp38-abi3-win_amd64.whl (16.4 MB)
Requirement already satisfied: pyarrow>=11.0.0 in d:\python38\lib\site-packages (from datafusion==36.0.0) (15.0.0)
Requirement already satisfied: numpy<2,>=1.16.6 in d:\python38\lib\site-packages (from pyarrow>=11.0.0->datafusion==36.0.0) (1.21.0)
Installing collected packages: datafusion
  Attempting uninstall: datafusion
    Found existing installation: datafusion 37.1.0
    Uninstalling datafusion-37.1.0:
      Successfully uninstalled datafusion-37.1.0
Successfully installed datafusion-36.0.0

D:\mathhigh>python
Python 3.8.8 (tags/v3.8.8:024d805, Feb 19 2021, 13:18:16) [MSC v.1928 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import datafusion
>>> print(datafusion.__version__)
36.0.0

Expected behavior

it can be imported in python

Additional context

No response

l1t1 commented 1 month ago

BTW, the above issue occurs in windows 7 python 3.8. version 37.1.0 can be imported in windows 10 python 3.12, but the datafusion-cli is still missing.

C:\Users\LD\Downloads>pip install datafusion -U
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting datafusion
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/90/7e/09877d816952ff90f2bdcd49c45b199e20b226708068fa6a5bfb7d8ed51a/datafusion-37.1.0-cp38-abi3-win_amd64.whl (16.8 MB)
     ---------------------------------------- 16.8/16.8 MB 12.1 MB/s eta 0:00:00
Collecting pyarrow>=11.0.0 (from datafusion)
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/2c/e3/0879dfa4e1de2bcf06a22c9450af7755b4c9237588203b52df5927930b28/pyarrow-16.0.0-cp312-cp312-win_amd64.whl (25.8 MB)
     ---------------------------------------- 25.8/25.8 MB 9.0 MB/s eta 0:00:00
Collecting numpy>=1.16.6 (from pyarrow>=11.0.0->datafusion)
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/16/2e/86f24451c2d530c88daf997cb8d6ac622c1d40d19f5a031ed68a4b73a374/numpy-1.26.4-cp312-cp312-win_amd64.whl (15.5 MB)
     ---------------------------------------- 15.5/15.5 MB 13.3 MB/s eta 0:00:00
Installing collected packages: numpy, pyarrow, datafusion
Successfully installed datafusion-37.1.0 numpy-1.26.4 pyarrow-16.0.0

C:\Users\LD\Downloads>python
Python 3.12.2 (tags/v3.12.2:6abddd9, Feb  6 2024, 21:26:36) [MSC v.1937 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import datafusion
>>> print(datafusion.__version__)
37.1.0
>>> exit()

C:\Users\LD\Downloads>datafusion-cli
'datafusion-cli' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
l1t1 commented 1 month ago

is it same reason of this error? https://github.com/pola-rs/polars/issues/15450#issuecomment-2056143302