PySDD
PySDD copied to clipboard
macOS - The clang compiler does not support '-march=native'
When installing PySDD with pip install pysdd
I receive the following error.
clang: error: the clang compiler does not support '-march=native'
Here the full log obtained running pip install -vvv --upgrade --force-reinstall --no-deps --no-binary :all: pysdd
.
Workaround?
After some investigation I've discovered that it can be solved with export ARCHFLAGS="-arch x86_64"
before the installation. I don't know if this is just a workaround or if it can be considered an effective solution though.
System Specification
- OS: macOS Big Sur 11.4
- Laptop: MacBook Pro (13-inch, 2020)
- Processor: i5-1038NG7
-
uname -p
: i386 -
uname -v
: Darwin Kernel Version 20.5.0: Sat May 8 05:10:33 PDT 2021; root:xnu-7195.121.3~9/RELEASE_X86_64 - Python virtual environment with Python 3.8.2 and Cython 0.29.23, pip 21.1.2, setuptools 57.0.0
For anyone visiting this issue: I had the same problem, which I solved by following the steps in this SO post: https://stackoverflow.com/questions/63972113/big-sur-clang-invalid-version-error-due-to-macosx-deployment-target
sudo rm -rf /Library/Developer/CommandLineTools
sudo xcode-select --install
Had same error while working on a different project. I found enabling backwards compatibility did the trick for me.
export SYSTEM_VERSION_COMPAT=1
Here's a link to the article that helped.