ERROR: Failed building wheel for python-snappy with Python 3.11.7 on macOS
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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from intake/python-snappy
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
intake/python-snappy#152 · 3 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
intake/python-snappy#151 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
intake/python-snappy#150 · 2 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
intake/python-snappy#147 · 3 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
intake/python-snappy#140 · 1 comment · 1 reaction ·
All issues in intake/python-snappy
Similar issues
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
canonical/paas-charm#368 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
tech debt
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
StevenBlack/hosts#3256 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
qualcomm/qai-appbuilder#275 ·