In addition, if someone has this error message>
########### CLIB COMPILER OPTIMIZATION ###########
Platform :
Architecture: aarch64
Compiler : clang
CPU baseline :
Requested : 'min'
Enabled : none
Flags : none
Extra checks: none
CPU dispatch :
Requested : 'max -xop -fma4'
Enabled : none
Generated : none
CCompilerOpt.cache_flush[809] : write cache to path
I found this solution before compile numpy and scipy
Analysis of reasons:
From the above error message, you can see that the last error shows that clang has an error, so it is speculated that it should be an error caused by the compiler, because the new version of the xcode command tool uses the arm version of the compilation method by default, and if we want to use For x86 architecture, we need to manually set the specific architecture through environment variables.
export ARCHFLAGS="-arch x86_64"
example:
3c790c45799ec8c598753ebb22/build/temp.macosx-10.14.6-arm64-3.8/ccompiler_opt_cache_clib.py
----------------------------------------
ERROR: Command errored out with exit status 1: /Users/daniel_edu/Projects/PERSONAL/great_expectation_demo/.env/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/zb/c_b9kh2x1px7vl5683rwz8fr0000gn/T/pip-install-y8alaej_/numpy_3d813a3c790c45799ec8c598753ebb22/setup.py'"'"'; __file__='"'"'/private/var/folders/zb/c_b9kh2x1px7vl5683rwz8fr0000gn/T/pip-install-y8alaej_/numpy_3d813a3c790c45799ec8c598753ebb22/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/zb/c_b9kh2x1px7vl5683rwz8fr0000gn/T/pip-record-q9vraevr/install-record.txt --single-version-externally-managed --compile --install-headers /Users/daniel_edu/Projects/PERSONAL/great_expectation_demo/.env/include/site/python3.8/numpy Check the logs for full command output.
(.env) ➜ great_expectation_demo git:(master) ✗ export ARCHFLAGS="-arch x86_64"
(.env) ➜ great_expectation_demo git:(master) ✗ pip install --no-binary :all: --no-use-pep517 numpy
Collecting numpy
Using cached numpy-1.21.5.zip (10.7 MB)
Preparing metadata (setup.py) ... done
Skipping wheel build for numpy, due to binaries being disabled for it.
Installing collected packages: numpy
Running setup.py install for numpy ... done
Successfully installed numpy-1.21.5
brew install openblas gfortran
before numpy... numpy needed openblas at least – Campstool