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