pip 错误unused-command-line-argument-hard-error-in-future解决办法


Posted in Python onJune 01, 2014

在我的Mac Air上,用pip安装一些Python库时,偶尔就会遇到一些报错,关于“unused-command-line-argument-hard-error-in-future”,错误如下:

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 psutil/_psutil_osx.c -o build/temp.macosx-10.9-intel-2.7/psutil/_psutil_osx.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

这样的错误,出现次数多了,每次都去google,不如自己记录一下吧。
原因是:The Apple LLVM compiler in Xcode 5.1 treats unrecognized command-line options as errors. This issue has been seen when building both Python native extensions and Ruby Gems, where some invalid compiler options are currently specified.

解决方法:设置ARCHFLAGS参数,如下:

sudo ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future pip install psutil
Python 相关文章推荐
Python批量重命名同一文件夹下文件的方法
May 25 Python
Python的re模块正则表达式操作
May 25 Python
Python检测生僻字的实现方法
Oct 23 Python
用tensorflow实现弹性网络回归算法
Jan 09 Python
pyspark.sql.DataFrame与pandas.DataFrame之间的相互转换实例
Aug 02 Python
Python使用logging模块实现打印log到指定文件的方法
Sep 05 Python
python pexpect ssh 远程登录服务器的方法
Feb 14 Python
在pandas中遍历DataFrame行的实现方法
Oct 23 Python
Python中顺序表原理与实现方法详解
Dec 03 Python
让Django的BooleanField支持字符串形式的输入方式
May 20 Python
Python数据处理的三个实用技巧分享
Apr 01 Python
Python万能模板案例之matplotlib绘制甘特图
Apr 13 Python
2款Python内存检测工具介绍和使用方法
Jun 01 #Python
使用Python的Supervisor进行进程监控以及自动启动
May 29 #Python
python应用程序在windows下不出现cmd窗口的办法
May 29 #Python
python正则表达式re模块详细介绍
May 29 #Python
在python中的socket模块使用代理实例
May 29 #Python
python中stdout输出不缓存的设置方法
May 29 #Python
python两种遍历字典(dict)的方法比较
May 29 #Python
You might like
excellent!――ASCII Art(由目标图象生成ascii)
2007/02/20 PHP
PHP 网络开发详解之远程文件包含漏洞
2010/04/25 PHP
PHP手机号码归属地查询代码(API接口/mysql)
2012/09/04 PHP
PHP重定向的3种方式
2013/03/07 PHP
PHP中使用cURL实现Get和Post请求的方法
2013/03/13 PHP
基于AppServ,XAMPP,WAMP配置php.ini去掉警告信息(NOTICE)的方法详解
2013/05/07 PHP
在PHP上显示JFreechart画的统计图方法
2013/11/03 PHP
PHP产生不重复随机数的5个方法总结
2014/11/12 PHP
php强制用户转向www域名的方法
2015/06/19 PHP
SyntaxHighlighter代码加色使用方法
2008/09/07 Javascript
Js base64 加密解密介绍
2013/10/11 Javascript
Jquery each方法跳出循环,并获取返回值(实例讲解)
2013/12/12 Javascript
jq实现酷炫的鼠标经过图片翻滚效果
2014/03/12 Javascript
json传值以及ajax接收详解
2016/05/24 Javascript
详解为Bootstrap Modal添加拖拽的方法
2018/01/05 Javascript
解决vue打包项目后刷新404的问题
2018/03/06 Javascript
[43:32]2014 DOTA2华西杯精英邀请赛 5 25 LGD VS NewBee第一场
2014/05/26 DOTA
新手该如何学python怎么学好python?
2008/10/07 Python
Python使用MySQLdb for Python操作数据库教程
2014/10/11 Python
Flask入门教程实例:搭建一个静态博客
2015/03/27 Python
Python3中的2to3转换工具使用示例
2015/06/12 Python
Python MySQL数据库连接池组件pymysqlpool详解
2017/07/07 Python
Python栈算法的实现与简单应用示例
2017/11/01 Python
Python代码实现删除一个list里面重复元素的方法
2019/04/02 Python
python3在同一行内输入n个数并用列表保存的例子
2019/07/20 Python
2021年值得向Python开发者推荐的VS Code扩展插件
2021/01/25 Python
python 制作网站小说下载器
2021/02/20 Python
CSS3 滤镜 webkit-filter详细介绍及使用方法
2012/12/27 HTML / CSS
html5实现微信打飞机游戏
2014/03/27 HTML / CSS
HTML5 canvas绘制的玫瑰花效果
2014/05/29 HTML / CSS
阿迪达斯荷兰官方网站:adidas荷兰
2018/03/16 全球购物
全球领先的美容用品专卖店:Beauty Plus Salon
2018/09/04 全球购物
美国专业消费电子及摄影器材网站:B&H Photo Video
2019/12/18 全球购物
网络编程中设计并发服务器,使用多进程与多线程,请问有什么区别?
2016/03/27 面试题
家长对老师的感言
2014/03/11 职场文书
postgresql使用filter进行多维度聚合的解决方法
2021/07/16 PostgreSQL