crick
crick copied to clipboard
Building (locally) on M1 Mac OS does not work
Disclaimer: I do not understand cython builds well.
When I try to install crick from source on my M1 Mac, I get error messages that seem to indicate that the M1 architecture is confusing the build system into thinking it's Windows and then Windows build tools clearly aren't available. My reason for thinking this is related to M1 Macs is that the CI is currently successfully running pip install --no-deps --global-option build --global-option --debug -e . on Linux, Mac OS, and Windows.
M1 build errors (`pip install -e .`)
14:18:39 in crick on fix-skew-kurt-edge-cases [+?] via 🅒 crick-dev
➜ pip install -e .
Processing /Users/paul/work/sources/crick
Preparing metadata (setup.py) ... done
Building wheels for collected packages: crick
Building wheel for crick (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [31 lines of output]
/Users/paul/work/sources/crick/setup.py:4: DeprecationWarning:
`numpy.distutils` is deprecated since NumPy 1.23.0, as a result
of the deprecation of `distutils` itself. It will be removed for
Python >= 3.12. For older Python versions it will remain present.
It is recommended to use `setuptools < 60.0` for those Python versions.
For more details, see:
https://numpy.org/devdocs/reference/distutils_status_migration.html
import numpy.distutils.misc_util as np_misc
running bdist_wheel
running build
running build_py
copying crick/_version.py -> build/lib.macosx-11.0-arm64-cpython-39/crick
copying crick/__init__.py -> build/lib.macosx-11.0-arm64-cpython-39/crick
copying crick/tests/test_stats.py -> build/lib.macosx-11.0-arm64-cpython-39/crick/tests
copying crick/tests/test_space_saving.py -> build/lib.macosx-11.0-arm64-cpython-39/crick/tests
copying crick/tests/test_tdigest.py -> build/lib.macosx-11.0-arm64-cpython-39/crick/tests
UPDATING build/lib.macosx-11.0-arm64-cpython-39/crick/_version.py
set build/lib.macosx-11.0-arm64-cpython-39/crick/_version.py to '0.0.3+6.g2e827d2.dirty'
running build_ext
building 'crick.tdigest' extension
Warning: Can't read registry to find the necessary compiler setting
Make sure that Python modules winreg, win32api or win32con are installed.
INFO: C compiler: clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /Users/paul/mambaforge/envs/crick-dev/include -arch arm64 -fPIC -O2 -isystem /Users/paul/mambaforge/envs/crick-dev/include -arch arm64
INFO: compile options: '-Icrick -I/Users/paul/mambaforge/envs/crick-dev/lib/python3.9/site-packages/numpy/core/include -Icrick/klib -I/Users/paul/mambaforge/envs/crick-dev/include/python3.9 -c'
INFO: clang: crick/tdigest.c
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
error: Command "clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /Users/paul/mambaforge/envs/crick-dev/include -arch arm64 -fPIC -O2 -isystem /Users/paul/mambaforge/envs/crick-dev/include -arch arm64 -Icrick -I/Users/paul/mambaforge/envs/crick-dev/lib/python3.9/site-packages/numpy/core/include -Icrick/klib -I/Users/paul/mambaforge/envs/crick-dev/include/python3.9 -c crick/tdigest.c -o build/temp.macosx-11.0-arm64-cpython-39/crick/tdigest.o" failed with exit status 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for crick
Running setup.py clean for crick
Failed to build crick
Installing collected packages: crick
Running setup.py install for crick ... error
error: subprocess-exited-with-error
× Running setup.py install for crick did not run successfully.
│ exit code: 1
╰─> [40 lines of output]
/Users/paul/work/sources/crick/setup.py:4: DeprecationWarning:
`numpy.distutils` is deprecated since NumPy 1.23.0, as a result
of the deprecation of `distutils` itself. It will be removed for
Python >= 3.12. For older Python versions it will remain present.
It is recommended to use `setuptools < 60.0` for those Python versions.
For more details, see:
https://numpy.org/devdocs/reference/distutils_status_migration.html
import numpy.distutils.misc_util as np_misc
running install
/Users/paul/mambaforge/envs/crick-dev/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
running build_py
creating build
creating build/lib.macosx-11.0-arm64-cpython-39
creating build/lib.macosx-11.0-arm64-cpython-39/crick
copying crick/_version.py -> build/lib.macosx-11.0-arm64-cpython-39/crick
copying crick/__init__.py -> build/lib.macosx-11.0-arm64-cpython-39/crick
creating build/lib.macosx-11.0-arm64-cpython-39/crick/tests
copying crick/tests/test_stats.py -> build/lib.macosx-11.0-arm64-cpython-39/crick/tests
copying crick/tests/test_space_saving.py -> build/lib.macosx-11.0-arm64-cpython-39/crick/tests
copying crick/tests/__init__.py -> build/lib.macosx-11.0-arm64-cpython-39/crick/tests
copying crick/tests/test_tdigest.py -> build/lib.macosx-11.0-arm64-cpython-39/crick/tests
UPDATING build/lib.macosx-11.0-arm64-cpython-39/crick/_version.py
set build/lib.macosx-11.0-arm64-cpython-39/crick/_version.py to '0.0.3+6.g2e827d2.dirty'
running build_ext
building 'crick.tdigest' extension
Warning: Can't read registry to find the necessary compiler setting
Make sure that Python modules winreg, win32api or win32con are installed.
INFO: C compiler: clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /Users/paul/mambaforge/envs/crick-dev/include -arch arm64 -fPIC -O2 -isystem /Users/paul/mambaforge/envs/crick-dev/include -arch arm64
creating build/temp.macosx-11.0-arm64-cpython-39
creating build/temp.macosx-11.0-arm64-cpython-39/crick
INFO: compile options: '-Icrick -I/Users/paul/mambaforge/envs/crick-dev/lib/python3.9/site-packages/numpy/core/include -Icrick/klib -I/Users/paul/mambaforge/envs/crick-dev/include/python3.9 -c'
INFO: clang: crick/tdigest.c
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
error: Command "clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /Users/paul/mambaforge/envs/crick-dev/include -arch arm64 -fPIC -O2 -isystem /Users/paul/mambaforge/envs/crick-dev/include -arch arm64 -Icrick -I/Users/paul/mambaforge/envs/crick-dev/lib/python3.9/site-packages/numpy/core/include -Icrick/klib -I/Users/paul/mambaforge/envs/crick-dev/include/python3.9 -c crick/tdigest.c -o build/temp.macosx-11.0-arm64-cpython-39/crick/tdigest.o" failed with exit status 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> crick
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.