Mac OS X 10.9.1上的Spynner安装错误

时间:2013-12-24 10:44:55

标签: python macos spynner

我无法在Mac OS X 10.9.1(Mavericks)上安装spynner。我收到以下错误:

error: command 'cc' failed with exit status 1

提到安装autopy依赖项时会引发错误。我安装了Xcode,命令行工具。

cc --version
Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
Target: x86_64-apple-darwin13.0.0
Thread model: posix

gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
Target: x86_64-apple-darwin13.0.0
Thread model: posix$

任何帮助都将受到高度赞赏。 谢谢。

3 个答案:

答案 0 :(得分:0)

正如你所说,Spynner依赖于Autopy,安装失败,因为编译时autopy的编译失败了:

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

已建议修复here。你应该从源代码下载autopy并修改你在C文件顶部添加的文件src / screengrab.c

#include <OpenGL/gl.h>

重新编译该文件 您还可以尝试更改编译标志或从源

安装libpng

答案 1 :(得分:0)

$ git clone git://github.com/msanders/autopy.git

$ cd autopy

添加

#include "/System/Library/Frameworks/OpenGL.framework/Versions/A/Headers/gl.h"

instead of

#include 

$ python setup.py build

$ sudo python setup.py install

答案 2 :(得分:0)

我遇到了同样的问题,我终于修复了它。确保您的命令行工具是最新的,然后从src构建autopy。对于Xcode 5.1(OSX 10.9)和Xcode 5.1.1(OSX 10.10),运行以下命令下载并安装最新的命令行工具:

xcode-select --install

完成后,下载autopy:

git clone git://github.com/msanders/autopy.git

安装autopy:

cd autopy && sudo python setup.py install

使用pip安装Spynner:

sudo pip install spynner

希望将来有一段时间可以节省一些人! **注意:过去我已经安装了命令行工具。由于我刚刚更新到10.10,似乎我不得不重新安装它们。说得通。

相关问题