Skip to content

lz4 fails to import on mac osx #267

Closed

Description

@braingram
>> python -c "import lz4"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/bgraham/.pyenv/versions/lz4_macosx/lib/python3.10/site-packages/lz4/__init__.py", line 14, in <module>
    from ._version import (  # noqa: F401
ImportError: dlopen(/Users/bgraham/.pyenv/versions/lz4_macosx/lib/python3.10/site-packages/lz4/_version.cpython-310-darwin.so, 0x0002): symbol not found in flat namespace (_LZ4_versionNumber)
>> pip freeze
lz4==4.3.1
>>  sw_vers
ProductName:	macOS
ProductVersion:	12.6
BuildVersion:	21G115

Darwin Kernel Version 21.6.0
arm64

4.3.0 fails same as 4.3.1.

Installing 4.2.0 works without issue.

This may be related to PR #264

Activity

  1. jonathanunderwood commented on Dec 30, 2022

    @jonathanunderwood
    Member

    Are you on an arm or intel mac?

  2. braingram commented on Dec 30, 2022

    @braingram
    Author

    I'm on arm64. Let me know if there's any more information I can supply

  3. jonathanunderwood commented on Dec 30, 2022

    @jonathanunderwood
    Member

    If you do a brew install lz4 does it work? [This wouldn't be the final solution, but what I suspect is happening is that the wheels are being built against system installed lz4 rather than the bundled lz4 libs]

  4. braingram commented on Dec 30, 2022

    @braingram
    Author

    It does not appear to

    >> brew list | grep lz4
    lz4
    >> python -c "import lz4"
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/Users/bgraham/.pyenv/versions/lz4_macosx/lib/python3.10/site-packages/lz4/__init__.py", line 14, in <module>
        from ._version import (  # noqa: F401
    ImportError: dlopen(/Users/bgraham/.pyenv/versions/lz4_macosx/lib/python3.10/site-packages/lz4/_version.cpython-310-darwin.so, 0x0002): symbol not found in flat namespace (_LZ4_versionNumber)
    >> pip freeze
    lz4==4.3.1
  5. jonathanunderwood commented on Dec 30, 2022

    @jonathanunderwood
    Member

    Have pushed a build for 4.3.2 - please test that once it hits PyPi (will take an hour ish)

  6. jonathanunderwood commented on Dec 30, 2022

    @jonathanunderwood
    Member

    4.3.2 is now published.

  7. braingram commented on Dec 30, 2022

    @braingram
    Author

    Tested with 4.3.2 and it's working (with and without lz4 installed through homebrew). Thanks for the quick response!

  8. jonathanunderwood commented on Dec 30, 2022

    @jonathanunderwood
    Member

    Great - thanks for reporting and testing, much appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions