相关疑难解决方法(0)

clang错误:未知参数:'-mno-fused-madd'(python包安装失败)

尝试psycopg2通过Pip在Mavericks 10.9上安装时出现以下错误:

clang: error: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error-in-future]
Run Code Online (Sandbox Code Playgroud)

不确定如何继续并在此处和其他地方搜索此特定错误.任何帮助深表感谢!

以下是pip的完整输出:

$ pip install psycopg2
Downloading/unpacking psycopg2
  Downloading psycopg2-2.5.2.tar.gz (685kB): 685kB downloaded
  Running setup.py (path:/private/var/folders/0z/ljjwsjmn4v9_zwm81vhxj69m0000gn/T/pip_build_tino/psycopg2/setup.py) egg_info for package psycopg2

Installing collected packages: psycopg2
  Running setup.py install for psycopg2
    building 'psycopg2._psycopg' 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 -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION="2.5.2 (dt dec pq3 …
Run Code Online (Sandbox Code Playgroud)

python pip clang osx-mavericks

269
推荐指数
4
解决办法
7万
查看次数

无法在Mac OS x 10.9上安装Lxml

我想安装Lxml,然后我可以安装Scrapy.

当我今天更新我的Mac时它不会让我重新安装lxml,我收到以下错误:

In file included from src/lxml/lxml.etree.c:314:
/private/tmp/pip_build_root/lxml/src/lxml/includes/etree_defs.h:9:10: fatal error: 'libxml/xmlversion.h' file not found
#include "libxml/xmlversion.h"
         ^
1 error generated.
error: command 'cc' failed with exit status 1
Run Code Online (Sandbox Code Playgroud)

我已经尝试使用brew来安装libxml2和libxslt,两者都安装得很好但我仍然无法安装lxml.

上次我安装时我需要在Xcode上启用开发人员工具,但由于它更新到Xcode 5,它不再给我这个选项了.

有谁知道我需要做什么?

python macos xcode lxml scrapy

233
推荐指数
10
解决办法
9万
查看次数

如何在(最好是纯粹的)Python中解码QR码图像?

TL; DR:我需要一种方法来解码使用(最好是纯粹的)Python的图像文件中的QR码.

我有一个带有QR码的jpg文件,我想用Python解码.我找到了几个声称这样做的图书馆:

PyQRCode(这里的网站)据说可以通过简单地提供这样的路径来解码图像中的qr代码:

import sys, qrcode
d = qrcode.Decoder()
if d.decode('out.png'):
    print 'result: ' + d.result
else:
    print 'error: ' + d.error
Run Code Online (Sandbox Code Playgroud)

所以我只是使用它安装它sudo pip install pyqrcode.然而,我对上面的示例代码感到奇怪的是,它只导入qrcode(而不是导入pyqrcode)因为我认为qrcode引用这个只能生成 qr代码图像的,这让我很困惑.所以,我想上面两个密码pyqrcodeqrcode,但双方未能在第二条线的说法AttributeError: 'module' object has no attribute 'Decoder'.此外,该网站是指Ubuntu 8.10(超过6年前推出),我找不到它的公共(git或其他)存储库来检查最新的提交.所以我转到了下一个图书馆:

ZBar(这里的网站)声称是,"an open source software suite for reading bar codes from various sources, such as image files." …

python decode qr-code zxing zbar

72
推荐指数
6
解决办法
9万
查看次数

Ansible安装-clang:错误:未知参数:' - mno-fused-madd'

所以,我发现其他一些铿锵错误似乎有些类似,但是,修复不适用于我的情况.

我正在使用OSX Mavericks,我们正在尝试安装Ansible.我有点正确安装,但是当我尝试安装Ansible时,我得到了这个clang错误.我们首先想到它可能是一个版本问题,所以我在使用gcc49遇到同样的错误后重新安装了gcc46,但我仍然遇到错误.

有谁知道如何解决这一问题?

来自pip.log日志文件的完整错误报告如下:

cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -Wall -Wstrict-prototypes -Wshorten-64-to-32 -fwrapv -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch x86_64 -arch i386 -pipe -std=c99 -O3 -fomit-frame-pointer -Isrc/ -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/MD2.c -o build/temp.macosx-10.9-intel-2.7/src/MD2.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

----------------------------------------
Cleaning up...
  Removing temporary dir /private/tmp/pip_build_root...
Command …
Run Code Online (Sandbox Code Playgroud)

gcc ansible osx-mavericks

23
推荐指数
2
解决办法
2万
查看次数

无法在Mac Mavericks上安装python mysql库

在Mountain Lion更新之前,它就像一个魅力.

更新后,它被破坏,我无法再次获得环境.

有人知道如何解决这个问题吗?

错误以粗体显示,如下所示.

fedorius@this:~$ pip install mysql-python
Downloading/unpacking mysql-python
  Downloading MySQL-python-1.2.5.zip (108kB): 108kB downloaded
  Running setup.py (path:/private/var/folders/21/zjvwzn891jnf4rnp526y13200000gn/T/pip_build_fedorius/mysql-python/setup.py) egg_info for package mysql-python

Installing collected packages: mysql-python
  Running setup.py install for mysql-python
    building '_mysql' extension
    cc -fno-strict-aliasing -fno-common -dynamic -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 -pipe -Dversion_info=(1,2,5,'final',1) -D__version__=1.2.5 -I/usr/local/mysql/include -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _mysql.c -o build/temp.macosx-10.9-intel-2.7/_mysql.o -Os -g -fno-strict-aliasing -arch x86_64
    clang: error: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error-in-future]
    clang: …
Run Code Online (Sandbox Code Playgroud)

python django macos mysql-python osx-mavericks

14
推荐指数
1
解决办法
9947
查看次数

如何安装NodeBox for console

我正在研究OS X Mavericks,并希望在Python脚本中使用NodeBox模块.

关于如何为控制台安装模块的帖子是从2009年开始的,不再适用,因为它引用版本1.9.x(当前为3.0.40).此外,SVN源不再存在.这些消息来源可以在GitHub上找到.

通过克隆项目并运行:

ant run
Run Code Online (Sandbox Code Playgroud)

我得到的只是桌面版的构建.

如何在Python脚本中正确安装和运行最新的NodeBox模块?

python python-module python-2.7 nodebox

7
推荐指数
1
解决办法
895
查看次数

命令'cc'在OSX High Sierra上以退出状态1失败

我正试图在Mac Os高山上运行

pip install MySQL-python
Run Code Online (Sandbox Code Playgroud)

但我得到了

error: command 'cc' failed with exit status 1
Run Code Online (Sandbox Code Playgroud)

我已经尝试过关于这个主题的解决方案,但它没有用.

这是完整的错误消息

The directory '/Users/filipeferminiano/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/Users/filipeferminiano/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the …
Run Code Online (Sandbox Code Playgroud)

python macos mysql-python python-2.7

4
推荐指数
2
解决办法
4768
查看次数