I am trying to install a python package by using python setup.py install
but at some point of the installation procedure an error is raised:
gcc: error: x86_64: No such file or directory
gcc: error: unrecognized option ‘-arch’
error: command 'gcc' failed with exit status 1
Previously, I installed Xcode 7.0 and their respective Command Line Tools for Xcode 7. The compiler seems to be in which gcc
local /usr/local/bin/gcc
. However, when I tried gcc -v
I got Segmentation fault: 11
. Moreover, when I tried /usr/bin/gcc -v
I got
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 7.0.0 (clang-700.0.72)
Target: x86_64-apple-darwin14.5.0
Thread model: posix
Then, the installed compiler seems to be in a different location. A similar issue was raised in Command line tool installed, but gcc/g++ compiler not working but there is not a clear solution to the problem. Do you have any idea how can I can fix it (link to the actual installed compiler to continue the installation of the Python package)? Thanks in advance.