"Cc" error with "exit status 1" error when installing python library

Like many others, I am having problems installing the python library (loaded as tar and then retrieved).

rodolphe-mbp:python-Levenshtein-0.11.2 Rodolphe$ sudo python setup.py install running install running bdist_egg running egg_info writing requirements to python_Levenshtein.egg-info/requires.txt writing python_Levenshtein.egg-info/PKG-INFO writing namespace_packages to python_Levenshtein.egg-info/namespace_packages.txt writing top-level names to python_Levenshtein.egg-info/top_level.txt writing dependency_links to python_Levenshtein.egg-info/dependency_links.txt writing entry points to python_Levenshtein.egg-info/entry_points.txt reading manifest file 'python_Levenshtein.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' warning: no files found matching '*' under directory 'docs' warning: no previously-included files matching '*pyc' found anywhere in distribution warning: no previously-included files matching '.project' found anywhere in distribution warning: no previously-included files matching '.pydevproject' found anywhere in distribution writing manifest file 'python_Levenshtein.egg-info/SOURCES.txt' installing library code to build/bdist.macosx-10.9-intel/egg running install_lib running build_ext building 'Levenshtein' extension cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch x86_64 -arch i386 -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c Levenshtein.c -o build/temp.macosx-10.9-intel-2.7/Levenshtein.o clang: error: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error-in-future] clang: note: this will be a hard error (cannot be downgraded to a warning) in the future error: command 'cc' failed with exit status 1 

As suggested elsewhere, I tried to log into the terminal "ARCHFLAGS = -Wno-error = unused-command-line-argument-hard-error-in-future sudo python setup.py install", but without success.

Is there a way around this problem that seems to have appeared with xcode 5.1?

+33
python clang osx-mavericks
Mar 27 '14 at 19:33
source share
3 answers

Installation using (inside the program drop-down folder)

 sudo -E python setup.py install 

completed the task!

+7
Mar 27 '14 at 19:50
source share

Run these two lines in your shell before creating:

 export CFLAGS=-Qunused-arguments export CPPFLAGS=-Qunused-arguments 

This export tells the compiler to ignore unused arguments, rather than complain about them.




Python seems to compile modules using the parameters it was built with, except that one of these parameters no longer works in mavericks:

the clang 3.4 Apple sends errors by default to unknown flags, but CPython builds the modules using the same set of flags with which it was originally compiled.

(from: https://stackoverflow.com )

A lot of people work in this:

  • Ansible Installation -clang: error: unknown argument: '-mno-fused-madd'
  • Unable to install python mysql library on Mac Mavericks
  • clang error: unknown argument: '-mno-fused-madd' (python package installation error)
+70
Mar 27 '14 at 19:57
source share

For me, the problem was that I just updated Xcode and you had to install the command line tools (see this answer ).

After running xcode-select --install my python library is installed normally.

+24
Nov 07 '16 at 20:31
source share



All Articles