Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

python snappy fails on Mac M2 processor

Open
#123 1 comment 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
macos, python

Research direction

Reproduce the failure with the script shown in test_snappy.py on a Mac with an M2 processor, after installing snappy with Homebrew and python-snappy in Python 3.10. Start with the traceback paths under site-packages/snappy, especially _snappy.cpython-310-darwin.so and snappy_cffi.py. Done means importing snappy and completing the compress/uncompress round trip successfully.

Written by the indexing model from the issue text.

Description

I have installed snappy via brew and that says it installed fine.

But when I pip install python-snappy and then run the following script:

import snappy

compressed = snappy.compress("some data")
assert "some data" == snappy.uncompress(compressed)

it fails with:

(venv) ~/code/projectblue-api/src (feature/ARM/build-stuff) $ python test_snappy.py 
Traceback (most recent call last):
  File "<...snip...>/venv/lib/python3.10/site-packages/snappy/snappy.py", line 48, in <module>
    from ._snappy import UncompressError, compress, decompress, \
ImportError: dlopen(<...snip...>/venv/lib/python3.10/site-packages/snappy/_snappy.cpython-310-darwin.so, 0x0002): symbol not found in flat namespace '_snappy_compress'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<...snip...>/src/test_snappy.py", line 1, in <module>
    import snappy
  File "<...snip...>/venv/lib/python3.10/site-packages/snappy/__init__.py", line 3, in <module>
    from .snappy import (
  File "<...snip...>/venv/lib/python3.10/site-packages/snappy/snappy.py", line 51, in <module>
    from .snappy_cffi import UncompressError, compress, decompress, \
  File "<...snip...>/venv/lib/python3.10/site-packages/snappy/snappy_cffi.py", line 3, in <module>
    from ._snappy_cffi import ffi, lib
ModuleNotFoundError: No module named 'snappy._snappy_cffi'
Dominant language
Python
Stars
490
Forks
104
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from intake/python-snappy

All issues in intake/python-snappy

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.