gpt4 book ai didi

python - clang : error: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error-in-future]

转载 作者:太空狗 更新时间:2023-10-29 17:38:14 25 4
gpt4 key购买 nike

我尝试在 Mavericks 操作系统中安装 Scrapy 时遇到以下错误。

我安装了命令行工具和 X11 我真的不知道发生了什么,我在浏览 Web 时也没有发现同样的错误。我认为这可能与 Xcode 5.1 中的某些更改有关

感谢您的回答!

这是命令输出的一部分:

$pip 安装 scrapy


.
.
.
.

Downloading/unpacking cryptography>=0.2.1 (from pyOpenSSL->scrapy)
Downloading cryptography-0.3.tar.gz (208kB): 208kB downloaded
Running setup.py egg_info for package cryptography
OS/X: confusion between 'cc' versus 'gcc' (see issue 123)
will not use '__thread' in the C code
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
Traceback (most recent call last):
File "<string>", line 16, in <module>
File "/Users/agonzamart/.virtualenvs/Parser/build/cryptography/setup.py", line 156, in <module>
"test": PyTest,
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 112, in setup
_setup_distribution = dist = klass(attrs)
File "/Users/agonzamart/.virtualenvs/Parser/lib/python2.7/site-packages/setuptools/dist.py", line 265, in __init__
self.fetch_build_eggs(attrs.pop('setup_requires'))
File "/Users/agonzamart/.virtualenvs/Parser/lib/python2.7/site-packages/setuptools/dist.py", line 289, in fetch_build_eggs
parse_requirements(requires), installer=self.fetch_build_egg
File "/Users/agonzamart/.virtualenvs/Parser/lib/python2.7/site-packages/pkg_resources.py", line 618, in resolve
dist = best[req.key] = env.best_match(req, self, installer)
File "/Users/agonzamart/.virtualenvs/Parser/lib/python2.7/site-packages/pkg_resources.py", line 862, in best_match
return self.obtain(req, installer) # try and download/install
File "/Users/agonzamart/.virtualenvs/Parser/lib/python2.7/site-packages/pkg_resources.py", line 874, in obtain
return installer(requirement)
File "/Users/agonzamart/.virtualenvs/Parser/lib/python2.7/site-packages/setuptools/dist.py", line 339, in fetch_build_egg
return cmd.easy_install(req)
File "/Users/agonzamart/.virtualenvs/Parser/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 623, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "/Users/agonzamart/.virtualenvs/Parser/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 653, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "/Users/agonzamart/.virtualenvs/Parser/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 849, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "/Users/agonzamart/.virtualenvs/Parser/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1130, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "/Users/agonzamart/.virtualenvs/Parser/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1118, in run_setup
raise DistutilsError("Setup script exited with %s" % (v.args[0],))
distutils.errors.DistutilsError: Setup script exited with error: command 'cc' failed with exit status 1
Complete output from command python setup.py egg_info:
OS/X: confusion between 'cc' versus 'gcc' (see issue 123)

will not use '__thread' in the C code

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

Traceback (most recent call last):

File "<string>", line 16, in <module>

File "/Users/agonzamart/.virtualenvs/Parser/build/cryptography/setup.py", line 156, in <module>

"test": PyTest,

File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 112, in setup

_setup_distribution = dist = klass(attrs)

File "/Users/agonzamart/.virtualenvs/Parser/lib/python2.7/site-packages/setuptools/dist.py", line 265, in __init__

self.fetch_build_eggs(attrs.pop('setup_requires'))

File "/Users/agonzamart/.virtualenvs/Parser/lib/python2.7/site-packages/setuptools/dist.py", line 289, in fetch_build_eggs

parse_requirements(requires), installer=self.fetch_build_egg

File "/Users/agonzamart/.virtualenvs/Parser/lib/python2.7/site-packages/pkg_resources.py", line 618, in resolve

dist = best[req.key] = env.best_match(req, self, installer)

File "/Users/agonzamart/.virtualenvs/Parser/lib/python2.7/site-packages/pkg_resources.py", line 862, in best_match

return self.obtain(req, installer) # try and download/install

File "/Users/agonzamart/.virtualenvs/Parser/lib/python2.7/site-packages/pkg_resources.py", line 874, in obtain

return installer(requirement)

File "/Users/agonzamart/.virtualenvs/Parser/lib/python2.7/site-packages/setuptools/dist.py", line 339, in fetch_build_egg

return cmd.easy_install(req)

File "/Users/agonzamart/.virtualenvs/Parser/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 623, in easy_install

return self.install_item(spec, dist.location, tmpdir, deps)

File "/Users/agonzamart/.virtualenvs/Parser/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 653, in install_item

dists = self.install_eggs(spec, download, tmpdir)

File "/Users/agonzamart/.virtualenvs/Parser/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 849, in install_eggs

return self.build_and_install(setup_script, setup_base)

File "/Users/agonzamart/.virtualenvs/Parser/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1130, in build_and_install

self.run_setup(setup_script, setup_base, args)

File "/Users/agonzamart/.virtualenvs/Parser/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1118, in run_setup

raise DistutilsError("Setup script exited with %s" % (v.args[0],))

distutils.errors.DistutilsError: Setup script exited with error: command 'cc' failed with exit status 1

----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /Users/agonzamart/.virtualenvs/Parser/build/cryptography

最佳答案

这是由于 Xcode 5.1 中的 clang 默认值发生了变化,Apple 没有注意到它会破坏使用系统 Python 构建的扩展模块。一种解决方法是先定义以下环境变量:

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

更新 [2014-05-16]:正如预期的那样,Apple 已通过 OS X 10.9.3 中更新的系统 Python(2.7、2.6 和 2.5)解决了这个问题,因此解决方法是 no使用最新的 Mavericks 和 Xcode 5.1+ 时不再需要。但是,到目前为止,如果您在那里使用 Xcode 5.1+OS X 10.8.x(Mountain Lion,当前为 10.8.5)仍然需要解决方法。

关于python - clang : error: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error-in-future],我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22703393/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com