Skip to content

error when from datafusion import SessionContext  #830

Closed
@l1t1

Description

@l1t1

Describe the bug
when import


>>> from datafusion import SessionContext
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "D:\Python38\lib\site-packages\datafusion\__init__.py", line 29, in <module>
    from .context import (
  File "D:\Python38\lib\site-packages\datafusion\context.py", line 22, in <module>
    from ._internal import SessionConfig as SessionConfigInternal
ImportError: DLL load failed while importing _internal: 找不到指定的程序。

To Reproduce

pip install datafusion -U
python
from datafusion import SessionContext

Expected behavior
it works as old version, such as version 36.0 did

>>> from datafusion import SessionContext
>>> ctx = SessionContext()
>>> ctx.register_parquet("taxi", "d:/yellow_tripdata_2022-01.parquet")
>>> x="select passenger_count, count(*) from taxi where passenger_count is not null group by passenger_count order by passenger_count"
>>> df = ctx.sql(x)
>>> df
DataFrame()
+-----------------+----------+
| passenger_count | COUNT(*) |
+-----------------+----------+
| 0.0             | 52061    |
| 1.0             | 1794055  |
| 2.0             | 343026   |
| 3.0             | 84570    |
| 4.0             | 35321    |
| 5.0             | 51338    |
| 6.0             | 32037    |
| 7.0             | 9        |
| 8.0             | 8        |
| 9.0             | 3        |
+-----------------+----------+

Additional context
my os is windows 7
my python version

Python 3.8.8 (tags/v3.8.8:024d805, Feb 19 2021, 13:18:16) [MSC v.1928 64 bit (AMD64)] on win32

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions