当前位置: 首页 > 面试题库 >

安装python库时出现“'cc'失败,退出状态为1”的错误

倪炎彬
2023-03-14
问题内容

像许多其他工具一样,我在安装python库时遇到问题(下载为tar,然后解压缩)。

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

如在其他地方建议的那样,我尝试输入终端“ ARCHFLAGS = -Wno-error = unused-command-line-argument-
hard-error-in-future sudo python setup.py install”,但没有成功。

有没有办法解决似乎在xcode 5.1中出现的此问题?


问题答案:

安装方式(在您下拉的程序文件夹中)

sudo -E python setup.py install

做好了!



 类似资料:
  • 我想在我的系统上安装,以便为软件部署提供“herd”..但是终端显示一个gcc错误: 为什么找不到?

  • 问题内容: 我正在运行Ubuntu 11.04,Python 2.7.1,并想安装Pyaudio。所以我跑了 在终端中,并退出并显示以下错误消息, 我不确定是将其发布在askubuntu.com还是在stackoveflow中发布,但是无论如何,它都在stackoverflow中。另外我用谷歌搜索了一下这个问题,发现通过安装python- dev已经解决了一些问题。我已经安装了python-dev

  • 问题内容: 我在Windows 8.1 46位上使用Python 2.7。 我想安装divisi2 https://pypi.python.org/pypi/Divisi2/2.2.5 我已经安装了NumPy和SciPy,它们已经是divisi2的前提条件。我已经为python 9.0安装了Visual C ++。 每当我发出pip install divisi2命令时,我都会在控制台中收到以下错

  • 我在windows命令提示符下键入以下命令:pip install jupyterlab 我收到以下错误:

  • 问题内容: 我试图在Mac Os High Sierra上运行 但是我越来越 我已经尝试过有关该主题的解决方案,但是没有用。 这是完整的错误信息 这是蟒蛇 这是我正在使用的点 问题答案: abamert的答案对我不起作用。虽然这样做,但您可以尝试跳过第一步,

  • 我在mac os X Mojave 10.14.6上运行。我是一个命令行新手,我很迷茫。我看到这篇文章,并使用brew安装postgresql,但这似乎并没有解决我的任何问题。