Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install signatory on M2 Mac #60

Closed
levi0206 opened this issue Jul 25, 2023 · 1 comment
Closed

Install signatory on M2 Mac #60

levi0206 opened this issue Jul 25, 2023 · 1 comment

Comments

@levi0206
Copy link

levi0206 commented Jul 25, 2023

I ran
python -m pip install signatory==1.2.6.1.9.0 --no-cache-dir --force-reinstall
and this is the error message:

`python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [24 lines of output]
running bdist_wheel
/Users/lerong/miniconda3/envs/sigwgan/lib/python3.8/site-packages/torch/utils/cpp_extension.py:370: UserWarning: Attempted to use ninja as the BuildExtension backend but we could not find ninja.. Falling back to using the slow distutils backend.
warnings.warn(msg.format('we could not find ninja.'))
running build
running build_py
creating build
creating build/lib.macosx-11.0-arm64-cpython-38
creating build/lib.macosx-11.0-arm64-cpython-38/signatory
copying src/signatory/signature_inversion_module.py -> build/lib.macosx-11.0-arm64-cpython-38/signatory
copying src/signatory/logsignature_module.py -> build/lib.macosx-11.0-arm64-cpython-38/signatory
copying src/signatory/signature_module.py -> build/lib.macosx-11.0-arm64-cpython-38/signatory
copying src/signatory/unstable.py -> build/lib.macosx-11.0-arm64-cpython-38/signatory
copying src/signatory/utility.py -> build/lib.macosx-11.0-arm64-cpython-38/signatory
copying src/signatory/deprecated.py -> build/lib.macosx-11.0-arm64-cpython-38/signatory
copying src/signatory/init.py -> build/lib.macosx-11.0-arm64-cpython-38/signatory
copying src/signatory/augment.py -> build/lib.macosx-11.0-arm64-cpython-38/signatory
copying src/signatory/impl.py -> build/lib.macosx-11.0-arm64-cpython-38/signatory
copying src/signatory/path.py -> build/lib.macosx-11.0-arm64-cpython-38/signatory
running build_ext
building '_impl' extension
creating build/temp.macosx-11.0-arm64-cpython-38
creating build/temp.macosx-11.0-arm64-cpython-38/src
/usr/local/opt/llvm/bin/clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/lerong/miniconda3/envs/sigwgan/include -arch arm64 -I/Users/lerong/miniconda3/envs/sigwgan/include -arch arm64 -I/usr/local/opt/llvm/include -I/Users/lerong/miniconda3/envs/sigwgan/lib/python3.8/site-packages/torch/include -I/Users/lerong/miniconda3/envs/sigwgan/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/Users/lerong/miniconda3/envs/sigwgan/lib/python3.8/site-packages/torch/include/TH -I/Users/lerong/miniconda3/envs/sigwgan/lib/python3.8/site-packages/torch/include/THC -I/Users/lerong/miniconda3/envs/sigwgan/include/python3.8 -c src/logsignature.cpp -o build/temp.macosx-11.0-arm64-cpython-38/src/logsignature.o -fvisibility=hidden -fopenmp -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE="_clang" -DPYBIND11_STDLIB="_libcpp" -DPYBIND11_BUILD_ABI="_cxxabi1002" -DTORCH_EXTENSION_NAME=_impl -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
error: command '/usr/local/opt/llvm/bin/clang' failed: No such file or directory
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for signatory
Running setup.py clean for signatory
Failed to build signatory
ERROR: Could not build wheels for signatory, which is required to install pyproject.toml-based projects
(sigwgan) lerong@Rong ~ % brew install ninja
==> Downloading https://formulae.brew.sh/api/formula.jws.json
####################################################################################### 100.0%
==> Downloading https://formulae.brew.sh/api/cask.jws.json
####################################################################################### 100.0%
==> Fetching ninja
==> Downloading https://ghcr.io/v2/homebrew/core/ninja/manifests/1.11.1
####################################################################################### 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/ninja/blobs/sha256:6202ee2d9cdb003e70bd93acca
####################################################################################### 100.0%
==> Pouring ninja--1.11.1.arm64_ventura.bottle.tar.gz
==> Caveats
zsh completions have been installed to:
/opt/homebrew/share/zsh/site-functions

Emacs Lisp files have been installed to:
/opt/homebrew/share/emacs/site-lisp/ninja
==> Summary
🍺 /opt/homebrew/Cellar/ninja/1.11.1: 10 files, 435.3KB
==> Running brew cleanup ninja...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see man brew).
(sigwgan) lerong@Rong ~ % python -m pip install signatory==1.2.6.1.9.0 --no-cache-dir --force-reinstall
Collecting signatory==1.2.6.1.9.0
Downloading signatory-1.2.6.1.9.0.tar.gz (62 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 62.8/62.8 kB 755.9 kB/s eta 0:00:00
Preparing metadata (setup.py) ... done
Building wheels for collected packages: signatory
Building wheel for signatory (setup.py) ... error
error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [111 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-11.0-arm64-cpython-38
creating build/lib.macosx-11.0-arm64-cpython-38/signatory
copying src/signatory/signature_inversion_module.py -> build/lib.macosx-11.0-arm64-cpython-38/signatory
copying src/signatory/logsignature_module.py -> build/lib.macosx-11.0-arm64-cpython-38/signatory
copying src/signatory/signature_module.py -> build/lib.macosx-11.0-arm64-cpython-38/signatory
copying src/signatory/unstable.py -> build/lib.macosx-11.0-arm64-cpython-38/signatory
copying src/signatory/utility.py -> build/lib.macosx-11.0-arm64-cpython-38/signatory
copying src/signatory/deprecated.py -> build/lib.macosx-11.0-arm64-cpython-38/signatory
copying src/signatory/init.py -> build/lib.macosx-11.0-arm64-cpython-38/signatory
copying src/signatory/augment.py -> build/lib.macosx-11.0-arm64-cpython-38/signatory
copying src/signatory/impl.py -> build/lib.macosx-11.0-arm64-cpython-38/signatory
copying src/signatory/path.py -> build/lib.macosx-11.0-arm64-cpython-38/signatory
running build_ext
building 'impl' extension
creating /private/var/folders/l
/hv8jcrtx21gbrkh5jzb7xfz80000gn/T/pip-install-08eehflq/signatory_3d4fe674eff148669561bdf647a7d9ec/build/temp.macosx-11.0-arm64-cpython-38
creating /private/var/folders/l_/hv8jcrtx21gbrkh5jzb7xfz80000gn/T/pip-install-08eehflq/signatory_3d4fe674eff148669561bdf647a7d9ec/build/temp.macosx-11.0-arm64-cpython-38/src
Emitting ninja build file /private/var/folders/l_/hv8jcrtx21gbrkh5jzb7xfz80000gn/T/pip-install-08eehflq/signatory_3d4fe674eff148669561bdf647a7d9ec/build/temp.macosx-11.0-arm64-cpython-38/build.ninja...
Compiling objects...
Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
[1/6] c++ -MMD -MF /private/var/folders/l_/hv8jcrtx21gbrkh5jzb7xfz80000gn/T/pip-install-08eehflq/signatory_3d4fe674eff148669561bdf647a7d9ec/build/temp.macosx-11.0-arm64-cpython-38/src/signature.o.d -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/lerong/miniconda3/envs/sigwgan/include -arch arm64 -I/Users/lerong/miniconda3/envs/sigwgan/include -arch arm64 -I/usr/local/opt/llvm/include -I/Users/lerong/miniconda3/envs/sigwgan/lib/python3.8/site-packages/torch/include -I/Users/lerong/miniconda3/envs/sigwgan/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/Users/lerong/miniconda3/envs/sigwgan/lib/python3.8/site-packages/torch/include/TH -I/Users/lerong/miniconda3/envs/sigwgan/lib/python3.8/site-packages/torch/include/THC -I/Users/lerong/miniconda3/envs/sigwgan/include/python3.8 -c -c /private/var/folders/l_/hv8jcrtx21gbrkh5jzb7xfz80000gn/T/pip-install-08eehflq/signatory_3d4fe674eff148669561bdf647a7d9ec/src/signature.cpp -o /private/var/folders/l_/hv8jcrtx21gbrkh5jzb7xfz80000gn/T/pip-install-08eehflq/signatory_3d4fe674eff148669561bdf647a7d9ec/build/temp.macosx-11.0-arm64-cpython-38/src/signature.o -fvisibility=hidden -fopenmp -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="clang"' '-DPYBIND11_STDLIB="libcpp"' '-DPYBIND11_BUILD_ABI="cxxabi1002"' -DTORCH_EXTENSION_NAME=impl -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
FAILED: /private/var/folders/l
/hv8jcrtx21gbrkh5jzb7xfz80000gn/T/pip-install-08eehflq/signatory_3d4fe674eff148669561bdf647a7d9ec/build/temp.macosx-11.0-arm64-cpython-38/src/signature.o
c++ -MMD -MF /private/var/folders/l
/hv8jcrtx21gbrkh5jzb7xfz80000gn/T/pip-install-08eehflq/signatory_3d4fe674eff148669561bdf647a7d9ec/build/temp.macosx-11.0-arm64-cpython-38/src/signature.o.d -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/lerong/miniconda3/envs/sigwgan/include -arch arm64 -I/Users/lerong/miniconda3/envs/sigwgan/include -arch arm64 -I/usr/local/opt/llvm/include -I/Users/lerong/miniconda3/envs/sigwgan/lib/python3.8/site-packages/torch/include -I/Users/lerong/miniconda3/envs/sigwgan/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/Users/lerong/miniconda3/envs/sigwgan/lib/python3.8/site-packages/torch/include/TH -I/Users/lerong/miniconda3/envs/sigwgan/lib/python3.8/site-packages/torch/include/THC -I/Users/lerong/miniconda3/envs/sigwgan/include/python3.8 -c -c /private/var/folders/l
/hv8jcrtx21gbrkh5jzb7xfz80000gn/T/pip-install-08eehflq/signatory_3d4fe674eff148669561bdf647a7d9ec/src/signature.cpp -o /private/var/folders/l
/hv8jcrtx21gbrkh5jzb7xfz80000gn/T/pip-install-08eehflq/signatory_3d4fe674eff148669561bdf647a7d9ec/build/temp.macosx-11.0-arm64-cpython-38/src/signature.o -fvisibility=hidden -fopenmp -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_clang"' '-DPYBIND11_STDLIB="libcpp"' '-DPYBIND11_BUILD_ABI="cxxabi1002"' -DTORCH_EXTENSION_NAME=impl -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
clang: error: unsupported option '-fopenmp'
[2/6] c++ -MMD -MF /private/var/folders/l
/hv8jcrtx21gbrkh5jzb7xfz80000gn/T/pip-install-08eehflq/signatory_3d4fe674eff148669561bdf647a7d9ec/build/temp.macosx-11.0-arm64-cpython-38/src/misc.o.d -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/lerong/miniconda3/envs/sigwgan/include -arch arm64 -I/Users/lerong/miniconda3/envs/sigwgan/include -arch arm64 -I/usr/local/opt/llvm/include -I/Users/lerong/miniconda3/envs/sigwgan/lib/python3.8/site-packages/torch/include -I/Users/lerong/miniconda3/envs/sigwgan/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/Users/lerong/miniconda3/envs/sigwgan/lib/python3.8/site-packages/torch/include/TH -I/Users/lerong/miniconda3/envs/sigwgan/lib/python3.8/site-packages/torch/include/THC -I/Users/lerong/miniconda3/envs/sigwgan/include/python3.8 -c -c /private/var/folders/l
/hv8jcrtx21gbrkh5jzb7xfz80000gn/T/pip-install-08eehflq/signatory_3d4fe674eff148669561bdf647a7d9ec/src/misc.cpp -o /private/var/folders/l
/hv8jcrtx21gbrkh5jzb7xfz80000gn/T/pip-install-08eehflq/signatory_3d4fe674eff148669561bdf647a7d9ec/build/temp.macosx-11.0-arm64-cpython-38/src/misc.o -fvisibility=hidden -fopenmp -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="clang"' '-DPYBIND11_STDLIB="libcpp"' '-DPYBIND11_BUILD_ABI="cxxabi1002"' -DTORCH_EXTENSION_NAME=impl -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
FAILED: /private/var/folders/l
/hv8jcrtx21gbrkh5jzb7xfz80000gn/T/pip-install-08eehflq/signatory_3d4fe674eff148669561bdf647a7d9ec/build/temp.macosx-11.0-arm64-cpython-38/src/misc.o
c++ -MMD -MF /private/var/folders/l
/hv8jcrtx21gbrkh5jzb7xfz80000gn/T/pip-install-08eehflq/signatory_3d4fe674eff148669561bdf647a7d9ec/build/temp.macosx-11.0-arm64-cpython-38/src/misc.o.d -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/lerong/miniconda3/envs/sigwgan/include -arch arm64 -I/Users/lerong/miniconda3/envs/sigwgan/include -arch arm64 -I/usr/local/opt/llvm/include -I/Users/lerong/miniconda3/envs/sigwgan/lib/python3.8/site-packages/torch/include -I/Users/lerong/miniconda3/envs/sigwgan/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/Users/lerong/miniconda3/envs/sigwgan/lib/python3.8/site-packages/torch/include/TH -I/Users/lerong/miniconda3/envs/sigwgan/lib/python3.8/site-packages/torch/include/THC -I/Users/lerong/miniconda3/envs/sigwgan/include/python3.8 -c -c /private/var/folders/l
/hv8jcrtx21gbrkh5jzb7xfz80000gn/T/pip-install-08eehflq/signatory_3d4fe674eff148669561bdf647a7d9ec/src/misc.cpp -o /private/var/folders/l
/hv8jcrtx21gbrkh5jzb7xfz80000gn/T/pip-install-08eehflq/signatory_3d4fe674eff148669561bdf647a7d9ec/build/temp.macosx-11.0-arm64-cpython-38/src/misc.o -fvisibility=hidden -fopenmp -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_clang"' '-DPYBIND11_STDLIB="libcpp"' '-DPYBIND11_BUILD_ABI="cxxabi1002"' -DTORCH_EXTENSION_NAME=impl -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
clang: error: unsupported option '-fopenmp'
[3/6] c++ -MMD -MF /private/var/folders/l
/hv8jcrtx21gbrkh5jzb7xfz80000gn/T/pip-install-08eehflq/signatory_3d4fe674eff148669561bdf647a7d9ec/build/temp.macosx-11.0-arm64-cpython-38/src/pytorchbind.o.d -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/lerong/miniconda3/envs/sigwgan/include -arch arm64 -I/Users/lerong/miniconda3/envs/sigwgan/include -arch arm64 -I/usr/local/opt/llvm/include -I/Users/lerong/miniconda3/envs/sigwgan/lib/python3.8/site-packages/torch/include -I/Users/lerong/miniconda3/envs/sigwgan/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/Users/lerong/miniconda3/envs/sigwgan/lib/python3.8/site-packages/torch/include/TH -I/Users/lerong/miniconda3/envs/sigwgan/lib/python3.8/site-packages/torch/include/THC -I/Users/lerong/miniconda3/envs/sigwgan/include/python3.8 -c -c /private/var/folders/l
/hv8jcrtx21gbrkh5jzb7xfz80000gn/T/pip-install-08eehflq/signatory_3d4fe674eff148669561bdf647a7d9ec/src/pytorchbind.cpp -o /private/var/folders/l
/hv8jcrtx21gbrkh5jzb7xfz80000gn/T/pip-install-08eehflq/signatory_3d4fe674eff148669561bdf647a7d9ec/build/temp.macosx-11.0-arm64-cpython-38/src/pytorchbind.o -fvisibility=hidden -fopenmp -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="clang"' '-DPYBIND11_STDLIB="libcpp"' '-DPYBIND11_BUILD_ABI="cxxabi1002"' -DTORCH_EXTENSION_NAME=impl -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
FAILED: /private/var/folders/l
/hv8jcrtx21gbrkh5jzb7xfz80000gn/T/pip-install-08eehflq/signatory_3d4fe674eff148669561bdf647a7d9ec/build/temp.macosx-11.0-arm64-cpython-38/src/pytorchbind.o
c++ -MMD -MF /private/var/folders/l
/hv8jcrtx21gbrkh5jzb7xfz80000gn/T/pip-install-08eehflq/signatory_3d4fe674eff148669561bdf647a7d9ec/build/temp.macosx-11.0-arm64-cpython-38/src/pytorchbind.o.d -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/lerong/miniconda3/envs/sigwgan/include -arch arm64 -I/Users/lerong/miniconda3/envs/sigwgan/include -arch arm64 -I/usr/local/opt/llvm/include -I/Users/lerong/miniconda3/envs/sigwgan/lib/python3.8/site-packages/torch/include -I/Users/lerong/miniconda3/envs/sigwgan/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/Users/lerong/miniconda3/envs/sigwgan/lib/python3.8/site-packages/torch/include/TH -I/Users/lerong/miniconda3/envs/sigwgan/lib/python3.8/site-packages/torch/include/THC -I/Users/lerong/miniconda3/envs/sigwgan/include/python3.8 -c -c /private/var/folders/l
/hv8jcrtx21gbrkh5jzb7xfz80000gn/T/pip-install-08eehflq/signatory_3d4fe674eff148669561bdf647a7d9ec/src/pytorchbind.cpp -o /private/var/folders/l
/hv8jcrtx21gbrkh5jzb7xfz80000gn/T/pip-install-08eehflq/signatory_3d4fe674eff148669561bdf647a7d9ec/build/temp.macosx-11.0-arm64-cpython-38/src/pytorchbind.o -fvisibility=hidden -fopenmp -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_clang"' '-DPYBIND11_STDLIB="libcpp"' '-DPYBIND11_BUILD_ABI="cxxabi1002"' -DTORCH_EXTENSION_NAME=impl -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
clang: error: unsupported option '-fopenmp'
[4/6] c++ -MMD -MF /private/var/folders/l
/hv8jcrtx21gbrkh5jzb7xfz80000gn/T/pip-install-08eehflq/signatory_3d4fe674eff148669561bdf647a7d9ec/build/temp.macosx-11.0-arm64-cpython-38/src/logsignature.o.d -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/lerong/miniconda3/envs/sigwgan/include -arch arm64 -I/Users/lerong/miniconda3/envs/sigwgan/include -arch arm64 -I/usr/local/opt/llvm/include -I/Users/lerong/miniconda3/envs/sigwgan/lib/python3.8/site-packages/torch/include -I/Users/lerong/miniconda3/envs/sigwgan/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/Users/lerong/miniconda3/envs/sigwgan/lib/python3.8/site-packages/torch/include/TH -I/Users/lerong/miniconda3/envs/sigwgan/lib/python3.8/site-packages/torch/include/THC -I/Users/lerong/miniconda3/envs/sigwgan/include/python3.8 -c -c /private/var/folders/l
/hv8jcrtx21gbrkh5jzb7xfz80000gn/T/pip-install-08eehflq/signatory_3d4fe674eff148669561bdf647a7d9ec/src/logsignature.cpp -o /private/var/folders/l
/hv8jcrtx21gbrkh5jzb7xfz80000gn/T/pip-install-08eehflq/signatory_3d4fe674eff148669561bdf647a7d9ec/build/temp.macosx-11.0-arm64-cpython-38/src/logsignature.o -fvisibility=hidden -fopenmp -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="clang"' '-DPYBIND11_STDLIB="libcpp"' '-DPYBIND11_BUILD_ABI="cxxabi1002"' -DTORCH_EXTENSION_NAME=impl -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
FAILED: /private/var/folders/l
/hv8jcrtx21gbrkh5jzb7xfz80000gn/T/pip-install-08eehflq/signatory_3d4fe674eff148669561bdf647a7d9ec/build/temp.macosx-11.0-arm64-cpython-38/src/logsignature.o
c++ -MMD -MF /private/var/folders/l
/hv8jcrtx21gbrkh5jzb7xfz80000gn/T/pip-install-08eehflq/signatory_3d4fe674eff148669561bdf647a7d9ec/build/temp.macosx-11.0-arm64-cpython-38/src/logsignature.o.d -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/lerong/miniconda3/envs/sigwgan/include -arch arm64 -I/Users/lerong/miniconda3/envs/sigwgan/include -arch arm64 -I/usr/local/opt/llvm/include -I/Users/lerong/miniconda3/envs/sigwgan/lib/python3.8/site-packages/torch/include -I/Users/lerong/miniconda3/envs/sigwgan/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/Users/lerong/miniconda3/envs/sigwgan/lib/python3.8/site-packages/torch/include/TH -I/Users/lerong/miniconda3/envs/sigwgan/lib/python3.8/site-packages/torch/include/THC -I/Users/lerong/miniconda3/envs/sigwgan/include/python3.8 -c -c /private/var/folders/l
/hv8jcrtx21gbrkh5jzb7xfz80000gn/T/pip-install-08eehflq/signatory_3d4fe674eff148669561bdf647a7d9ec/src/logsignature.cpp -o /private/var/folders/l
/hv8jcrtx21gbrkh5jzb7xfz80000gn/T/pip-install-08eehflq/signatory_3d4fe674eff148669561bdf647a7d9ec/build/temp.macosx-11.0-arm64-cpython-38/src/logsignature.o -fvisibility=hidden -fopenmp -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_clang"' '-DPYBIND11_STDLIB="libcpp"' '-DPYBIND11_BUILD_ABI="cxxabi1002"' -DTORCH_EXTENSION_NAME=impl -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
clang: error: unsupported option '-fopenmp'
[5/6] c++ -MMD -MF /private/var/folders/l
/hv8jcrtx21gbrkh5jzb7xfz80000gn/T/pip-install-08eehflq/signatory_3d4fe674eff148669561bdf647a7d9ec/build/temp.macosx-11.0-arm64-cpython-38/src/tensor_algebra_ops.o.d -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/lerong/miniconda3/envs/sigwgan/include -arch arm64 -I/Users/lerong/miniconda3/envs/sigwgan/include -arch arm64 -I/usr/local/opt/llvm/include -I/Users/lerong/miniconda3/envs/sigwgan/lib/python3.8/site-packages/torch/include -I/Users/lerong/miniconda3/envs/sigwgan/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/Users/lerong/miniconda3/envs/sigwgan/lib/python3.8/site-packages/torch/include/TH -I/Users/lerong/miniconda3/envs/sigwgan/lib/python3.8/site-packages/torch/include/THC -I/Users/lerong/miniconda3/envs/sigwgan/include/python3.8 -c -c /private/var/folders/l
/hv8jcrtx21gbrkh5jzb7xfz80000gn/T/pip-install-08eehflq/signatory_3d4fe674eff148669561bdf647a7d9ec/src/tensor_algebra_ops.cpp -o /private/var/folders/l
/hv8jcrtx21gbrkh5jzb7xfz80000gn/T/pip-install-08eehflq/signatory_3d4fe674eff148669561bdf647a7d9ec/build/temp.macosx-11.0-arm64-cpython-38/src/tensor_algebra_ops.o -fvisibility=hidden -fopenmp -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="clang"' '-DPYBIND11_STDLIB="libcpp"' '-DPYBIND11_BUILD_ABI="cxxabi1002"' -DTORCH_EXTENSION_NAME=impl -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
FAILED: /private/var/folders/l
/hv8jcrtx21gbrkh5jzb7xfz80000gn/T/pip-install-08eehflq/signatory_3d4fe674eff148669561bdf647a7d9ec/build/temp.macosx-11.0-arm64-cpython-38/src/tensor_algebra_ops.o
c++ -MMD -MF /private/var/folders/l
/hv8jcrtx21gbrkh5jzb7xfz80000gn/T/pip-install-08eehflq/signatory_3d4fe674eff148669561bdf647a7d9ec/build/temp.macosx-11.0-arm64-cpython-38/src/tensor_algebra_ops.o.d -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/lerong/miniconda3/envs/sigwgan/include -arch arm64 -I/Users/lerong/miniconda3/envs/sigwgan/include -arch arm64 -I/usr/local/opt/llvm/include -I/Users/lerong/miniconda3/envs/sigwgan/lib/python3.8/site-packages/torch/include -I/Users/lerong/miniconda3/envs/sigwgan/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/Users/lerong/miniconda3/envs/sigwgan/lib/python3.8/site-packages/torch/include/TH -I/Users/lerong/miniconda3/envs/sigwgan/lib/python3.8/site-packages/torch/include/THC -I/Users/lerong/miniconda3/envs/sigwgan/include/python3.8 -c -c /private/var/folders/l
/hv8jcrtx21gbrkh5jzb7xfz80000gn/T/pip-install-08eehflq/signatory_3d4fe674eff148669561bdf647a7d9ec/src/tensor_algebra_ops.cpp -o /private/var/folders/l
/hv8jcrtx21gbrkh5jzb7xfz80000gn/T/pip-install-08eehflq/signatory_3d4fe674eff148669561bdf647a7d9ec/build/temp.macosx-11.0-arm64-cpython-38/src/tensor_algebra_ops.o -fvisibility=hidden -fopenmp -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_clang"' '-DPYBIND11_STDLIB="libcpp"' '-DPYBIND11_BUILD_ABI="cxxabi1002"' -DTORCH_EXTENSION_NAME=impl -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
clang: error: unsupported option '-fopenmp'
[6/6] c++ -MMD -MF /private/var/folders/l
/hv8jcrtx21gbrkh5jzb7xfz80000gn/T/pip-install-08eehflq/signatory_3d4fe674eff148669561bdf647a7d9ec/build/temp.macosx-11.0-arm64-cpython-38/src/lyndon.o.d -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/lerong/miniconda3/envs/sigwgan/include -arch arm64 -I/Users/lerong/miniconda3/envs/sigwgan/include -arch arm64 -I/usr/local/opt/llvm/include -I/Users/lerong/miniconda3/envs/sigwgan/lib/python3.8/site-packages/torch/include -I/Users/lerong/miniconda3/envs/sigwgan/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/Users/lerong/miniconda3/envs/sigwgan/lib/python3.8/site-packages/torch/include/TH -I/Users/lerong/miniconda3/envs/sigwgan/lib/python3.8/site-packages/torch/include/THC -I/Users/lerong/miniconda3/envs/sigwgan/include/python3.8 -c -c /private/var/folders/l
/hv8jcrtx21gbrkh5jzb7xfz80000gn/T/pip-install-08eehflq/signatory_3d4fe674eff148669561bdf647a7d9ec/src/lyndon.cpp -o /private/var/folders/l
/hv8jcrtx21gbrkh5jzb7xfz80000gn/T/pip-install-08eehflq/signatory_3d4fe674eff148669561bdf647a7d9ec/build/temp.macosx-11.0-arm64-cpython-38/src/lyndon.o -fvisibility=hidden -fopenmp -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="clang"' '-DPYBIND11_STDLIB="libcpp"' '-DPYBIND11_BUILD_ABI="cxxabi1002"' -DTORCH_EXTENSION_NAME=impl -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
FAILED: /private/var/folders/l
/hv8jcrtx21gbrkh5jzb7xfz80000gn/T/pip-install-08eehflq/signatory_3d4fe674eff148669561bdf647a7d9ec/build/temp.macosx-11.0-arm64-cpython-38/src/lyndon.o
c++ -MMD -MF /private/var/folders/l
/hv8jcrtx21gbrkh5jzb7xfz80000gn/T/pip-install-08eehflq/signatory_3d4fe674eff148669561bdf647a7d9ec/build/temp.macosx-11.0-arm64-cpython-38/src/lyndon.o.d -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/lerong/miniconda3/envs/sigwgan/include -arch arm64 -I/Users/lerong/miniconda3/envs/sigwgan/include -arch arm64 -I/usr/local/opt/llvm/include -I/Users/lerong/miniconda3/envs/sigwgan/lib/python3.8/site-packages/torch/include -I/Users/lerong/miniconda3/envs/sigwgan/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/Users/lerong/miniconda3/envs/sigwgan/lib/python3.8/site-packages/torch/include/TH -I/Users/lerong/miniconda3/envs/sigwgan/lib/python3.8/site-packages/torch/include/THC -I/Users/lerong/miniconda3/envs/sigwgan/include/python3.8 -c -c /private/var/folders/l
/hv8jcrtx21gbrkh5jzb7xfz80000gn/T/pip-install-08eehflq/signatory_3d4fe674eff148669561bdf647a7d9ec/src/lyndon.cpp -o /private/var/folders/l
/hv8jcrtx21gbrkh5jzb7xfz80000gn/T/pip-install-08eehflq/signatory_3d4fe674eff148669561bdf647a7d9ec/build/temp.macosx-11.0-arm64-cpython-38/src/lyndon.o -fvisibility=hidden -fopenmp -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_clang"' '-DPYBIND11_STDLIB="_libcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1002"' -DTORCH_EXTENSION_NAME=_impl -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
clang: error: unsupported option '-fopenmp'
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
File "/Users/lerong/miniconda3/envs/sigwgan/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1666, in _run_ninja_build
subprocess.run(
File "/Users/lerong/miniconda3/envs/sigwgan/lib/python3.8/subprocess.py", line 516, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.

  The above exception was the direct cause of the following exception:
  
  Traceback (most recent call last):
    File "<string>", line 2, in <module>
    File "<pip-setuptools-caller>", line 34, in <module>
    File "/private/var/folders/l_/hv8jcrtx21gbrkh5jzb7xfz80000gn/T/pip-install-08eehflq/signatory_3d4fe674eff148669561bdf647a7d9ec/setup.py", line 53, in <module>
      setuptools.setup(name=metadata.project,
    File "/Users/lerong/miniconda3/envs/sigwgan/lib/python3.8/site-packages/setuptools/__init__.py", line 107, in setup
      return distutils.core.setup(**attrs)
    File "/Users/lerong/miniconda3/envs/sigwgan/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 185, in setup
      return run_commands(dist)
    File "/Users/lerong/miniconda3/envs/sigwgan/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
      dist.run_commands()
    File "/Users/lerong/miniconda3/envs/sigwgan/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
      self.run_command(cmd)
    File "/Users/lerong/miniconda3/envs/sigwgan/lib/python3.8/site-packages/setuptools/dist.py", line 1244, in run_command
      super().run_command(command)
    File "/Users/lerong/miniconda3/envs/sigwgan/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
      cmd_obj.run()
    File "/Users/lerong/miniconda3/envs/sigwgan/lib/python3.8/site-packages/wheel/bdist_wheel.py", line 325, in run
      self.run_command("build")
    File "/Users/lerong/miniconda3/envs/sigwgan/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
      self.distribution.run_command(command)
    File "/Users/lerong/miniconda3/envs/sigwgan/lib/python3.8/site-packages/setuptools/dist.py", line 1244, in run_command
      super().run_command(command)
    File "/Users/lerong/miniconda3/envs/sigwgan/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
      cmd_obj.run()
    File "/Users/lerong/miniconda3/envs/sigwgan/lib/python3.8/site-packages/setuptools/_distutils/command/build.py", line 131, in run
      self.run_command(cmd_name)
    File "/Users/lerong/miniconda3/envs/sigwgan/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
      self.distribution.run_command(command)
    File "/Users/lerong/miniconda3/envs/sigwgan/lib/python3.8/site-packages/setuptools/dist.py", line 1244, in run_command
      super().run_command(command)
    File "/Users/lerong/miniconda3/envs/sigwgan/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
      cmd_obj.run()
    File "/Users/lerong/miniconda3/envs/sigwgan/lib/python3.8/site-packages/setuptools/command/build_ext.py", line 84, in run
      _build_ext.run(self)
    File "/Users/lerong/miniconda3/envs/sigwgan/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 345, in run
      self.build_extensions()
    File "/Users/lerong/miniconda3/envs/sigwgan/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 709, in build_extensions
      build_ext.build_extensions(self)
    File "/Users/lerong/miniconda3/envs/sigwgan/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 467, in build_extensions
      self._build_extensions_serial()
    File "/Users/lerong/miniconda3/envs/sigwgan/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 493, in _build_extensions_serial
      self.build_extension(ext)
    File "/Users/lerong/miniconda3/envs/sigwgan/lib/python3.8/site-packages/setuptools/command/build_ext.py", line 246, in build_extension
      _build_ext.build_extension(self, ext)
    File "/Users/lerong/miniconda3/envs/sigwgan/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 548, in build_extension
      objects = self.compiler.compile(
    File "/Users/lerong/miniconda3/envs/sigwgan/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 530, in unix_wrap_ninja_compile
      _write_ninja_file_and_compile_objects(
    File "/Users/lerong/miniconda3/envs/sigwgan/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1355, in _write_ninja_file_and_compile_objects
      _run_ninja_build(
    File "/Users/lerong/miniconda3/envs/sigwgan/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1682, in _run_ninja_build
      raise RuntimeError(message) from e
  RuntimeError: Error compiling objects for extension
  [end of output]

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

I've installed gcc compiler, ninja, and pyproject-toml.

My python==3.8.10, torch==1.9.0, up-to-date llvm and libomp

How to fix the error? Thank you very much.

@levi0206 levi0206 changed the title signatory on M2 Mac Install signatory on M2 Mac Jul 25, 2023
@levi0206
Copy link
Author

Solution: #43

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant