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

ERROR: Failed building wheel for python-snappy with Python 3.11.7 on macOS

Open
#127 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
38/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
macos, python
Domain
build-system

Research direction

Start with the failed build command and inspect src/snappy/snappymodule.cc, where compilation cannot find snappy-c.h. Check how the macOS installation supplies the native Snappy headers and how the package build configuration passes include paths. Done means python-snappy installs successfully with Python 3.11 on the reported macOS setup.

Written by the indexing model from the issue text.

Description

I follow the installation to install python-sappy on macOS (macOS 14.0), but got following errors:

CPPFLAGS="-I/opt/homebrew/include -L/opt/homebrew/lib" pip3 install python-snappy
Looking in indexes: https://pypi.python.org/simple, https://pypi.apple.com/simple
Collecting python-snappy
Using cached https://pypi.apple.com/packages/packages/98/7a/44a24bad98335b2c72e4cadcdecf79f50197d1bab9f22f863a274f104b96/python-snappy-0.6.1.tar.gz (24 kB)
Preparing metadata (setup.py) ... done
Building wheels for collected packages: python-snappy
Building wheel for python-snappy (setup.py) ... error
error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [29 lines of output]
/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/setuptools/_distutils/dist.py:264: UserWarning: Unknown distribution option: 'cffi_modules'
warnings.warn(msg)
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-10.9-universal2-cpython-311
creating build/lib.macosx-10.9-universal2-cpython-311/snappy
copying src/snappy/snappy.py -> build/lib.macosx-10.9-universal2-cpython-311/snappy
copying src/snappy/snappy_cffi.py -> build/lib.macosx-10.9-universal2-cpython-311/snappy
copying src/snappy/init.py -> build/lib.macosx-10.9-universal2-cpython-311/snappy
copying src/snappy/hadoop_snappy.py -> build/lib.macosx-10.9-universal2-cpython-311/snappy
copying src/snappy/snappy_formats.py -> build/lib.macosx-10.9-universal2-cpython-311/snappy
copying src/snappy/main.py -> build/lib.macosx-10.9-universal2-cpython-311/snappy
copying src/snappy/snappy_cffi_builder.py -> build/lib.macosx-10.9-universal2-cpython-311/snappy
running build_ext
building 'snappy._snappy' extension
creating build/temp.macosx-10.9-universal2-cpython-311
creating build/temp.macosx-10.9-universal2-cpython-311/src
creating build/temp.macosx-10.9-universal2-cpython-311/src/snappy
clang -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch arm64 -arch x86_64 -g -I/opt/homebrew/include -L/opt/homebrew/lib -I/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c src/snappy/crc32c.c -o build/temp.macosx-10.9-universal2-cpython-311/src/snappy/crc32c.o
clang: warning: argument unused during compilation: '-L/opt/homebrew/lib' [-Wunused-command-line-argument]
clang -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch arm64 -arch x86_64 -g -I/opt/homebrew/include -L/opt/homebrew/lib -I/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c src/snappy/snappymodule.cc -o build/temp.macosx-10.9-universal2-cpython-311/src/snappy/snappymodule.o
clang: warning: argument unused during compilation: '-L/opt/homebrew/lib' [-Wunused-command-line-argument]
src/snappy/snappymodule.cc:33:10: fatal error: 'snappy-c.h' file not found
#include <snappy-c.h>
^~~~~~~~~~~~
1 error generated.
error: command '/usr/bin/clang' failed with exit code 1
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for python-snappy
Running setup.py clean for python-snappy
Failed to build python-snappy
ERROR: Could not build wheels for python-snappy, which is required to install pyproject.toml-based projects

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.