I'm trying to build apache superset on MacOS Monterey with M1 chip.
Using this link https://superset.apache.org/docs/installation/installing-superset-from-scratch/ I tried to build superset in local and build fails at running command pip install apache-superset
Here is the terminal output.
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/Headers -Werror=implicit-function-declaration -arch arm64 -DNPY_NO_DEPRECATED_API=0 -I./pandas/_libs -Ipandas/_libs/src/klib -I/private/var/folders/90/lt6mj6m14t9cxxh8d9vp8z8c0000gq/T/pip-build-env-v3ffq4z2/overlay/lib/python3.9/site-packages/numpy/core/include -I/Users/vkancharla/projects/workfusion-superset/superset/apache-superset/venv/include -I/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/Headers -c pandas/_libs/algos.c -o build/temp.macosx-10.9-universal2-cpython-39/pandas/_libs/algos.o -Wno-error=unreachable-code
pandas/_libs/algos.c:45:10: fatal error: 'Python.h' file not found
#include "Python.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 pandas
Building wheel for python-geohash (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [25 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-10.9-universal2-cpython-39
copying geohash.py -> build/lib.macosx-10.9-universal2-cpython-39
copying quadtree.py -> build/lib.macosx-10.9-universal2-cpython-39
copying jpgrid.py -> build/lib.macosx-10.9-universal2-cpython-39
copying jpiarea.py -> build/lib.macosx-10.9-universal2-cpython-39
running build_ext
building '_geohash' extension
creating build/temp.macosx-10.9-universal2-cpython-39
creating build/temp.macosx-10.9-universal2-cpython-39/src
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/Headers -Werror=implicit-function-declaration -arch arm64 -DPYTHON_MODULE=1 -I/Users/vkancharla/projects/workfusion-superset/superset/apache-superset/venv/include -I/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/Headers -c src/geohash.cpp -o build/temp.macosx-10.9-universal2-cpython-39/src/geohash.o
src/geohash.cpp:14:9: warning: '__STDC_CONSTANT_MACROS' macro redefined [-Wmacro-redefined]
#define __STDC_CONSTANT_MACROS 1
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/stdint.h:120:12: note: previous definition is here
# define __STDC_CONSTANT_MACROS
^
src/geohash.cpp:538:10: fatal error: 'Python.h' file not found
#include <Python.h>
^~~~~~~~~~
1 warning and 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-geohash
Running setup.py clean for python-geohash
Failed to build pandas python-geohash
ERROR: Could not build wheels for pandas, which is required to install pyproject.toml-based projects