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

Error on import on MacOS with new release #2577

Closed
stinodego opened this issue Jun 7, 2024 · 9 comments
Closed

Error on import on MacOS with new release #2577

stinodego opened this issue Jun 7, 2024 · 9 comments
Labels
binding/python Issues for the Python package bug Something isn't working

Comments

@stinodego
Copy link

stinodego commented Jun 7, 2024

Ever since the recent release, one of our CI pipeline fails with this error:

ImportError while importing test module '/Users/runner/work/polars/polars/py-polars/tests/unit/io/test_delta.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
tests/unit/io/test_delta.py:10: in <module>
    from deltalake import DeltaTable
../.venv/lib/python3.12/site-packages/deltalake/__init__.py:1: in <module>
    from ._internal import __version__ as __version__
E   ImportError: dlopen(/Users/runner/work/polars/polars/.venv/lib/python3.12/site-packages/deltalake/_internal.abi3.so, 0x0002): symbol not found in flat namespace '_PyPyBaseObject_Type'

Link to the job (which runs on macos-13):
https://github.com/pola-rs/polars/actions/runs/9407528634/job/25914397270

This can be reproduced locally on a Mac with M-series processor:

from deltalake import DeltaTable
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/.../tmp/venv/lib/python3.11/site-packages/deltalake/__init__.py", line 1, in <module>
    from ._internal import __version__ as __version__
ImportError: dlopen(/Users/.../tmp/venv/lib/python3.11/site-packages/deltalake/_internal.abi3.so, 0x0002): symbol not found in flat namespace '_PyPyBaseObject_Type'
@stinodego stinodego added the bug Something isn't working label Jun 7, 2024
@ion-elgreco ion-elgreco added the binding/python Issues for the Python package label Jun 7, 2024
@stinodego stinodego changed the title Error on import on MacOS M1 with new release Error on import on MacOS with new release Jun 7, 2024
@rtyler
Copy link
Member

rtyler commented Jun 7, 2024

By recent release, I assume you're having trouble with deltalake 0.18.0?

@szarnyasg
Copy link

@rtyler this fails for me on macOS Sonoma with deltalake version 0.18.0 but works with 0.17.4.

@ion-elgreco
Copy link
Collaborator

This might be the same issue: PyO3/pyo3#3376

@stinodego
Copy link
Author

By recent release, I assume you're having trouble with deltalake 0.18.0?

Yes - apologies for being unclear. 0.17.4 works correctly.

@giacomorebecchi
Copy link
Contributor

I'm temporarily solving this by installing with pip install --no-binary :all: deltalake==0.18.0 --no-cache

@b45ch1
Copy link

b45ch1 commented Jun 11, 2024

I can confirm the issue on a Macbook M1

Steps to reproduce

python3.11 -m venv venv
source venv/bin/activate
pip install deltalake
echo "import deltalake" > run.py
python run.py 
Traceback (most recent call last):
  File "/Users/sewalter/tmp/deltalake1.8/run.py", line 1, in <module>
    from deltalake import DeltaTable
  File "/Users/sewalter/tmp/deltalake1.8/venv/lib/python3.11/site-packages/deltalake/__init__.py", line 1, in <module>
    from ._internal import __version__ as __version__
ImportError: dlopen(/Users/sewalter/tmp/deltalake1.8/venv/lib/python3.11/site-packages/deltalake/_internal.abi3.so, 0x0002): symbol not found in flat namespace '_PyPyBaseObject_Type'

@ion-elgreco
Copy link
Collaborator

Can someone try v0.18.1 please?

@stinodego
Copy link
Author

stinodego commented Jun 12, 2024

Seems to work fine! See the step "Install Python dependencies" in this workflow:
https://github.com/pola-rs/polars/actions/runs/9486777587/job/26141912223?pr=16906

Thanks so much for the fix ❤️

@ion-elgreco
Copy link
Collaborator

@stinodego great! Thanks for checking

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
binding/python Issues for the Python package bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants