简体   繁体   English

Mac OS X 10.9.1上的Spynner安装错误

[英]Spynner installation error on Mac OS X 10.9.1

I can't get to install spynner on Mac OS X 10.9.1 (Mavericks). 我无法在Mac OS X 10.9.1(Mavericks)上安装spynner I get the following error: 我收到以下错误:

error: command 'cc' failed with exit status 1

to mention that the error is thrown when the autopy dependency is installed. 提到安装autopy依赖项时抛出该错误。 I have the Xcode, command line tools installed. 我已经安装了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$

Any help would be highly appreciated. 任何帮助将不胜感激。 Thank you. 谢谢。

As you said, Spynner relies on Autopy, and the installation fails because the compilation of autopy fails while compiling: 如您所说,Spynner依赖于Autopy,并且安装失败是因为在编译时autopy的编译失败:

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

The fix has been suggested here . 已在此处建议修复程序。 You should download autopy from source and modify the file src/screengrab.c adding at the top of you C file 您应该从源代码下载autopy并修改文件src / screengrab.c并添加到C文件的顶部

#include <OpenGL/gl.h>

recompile the file You could also try to change compiling flags or install libpng from source 重新编译文件您也可以尝试更改编译标志或从源代码安装libpng

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

$ cd autopy $ cd autopy

add

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

instead of

#include

$ python setup.py build $ python setup.py构建

$ sudo python setup.py install $ sudo python setup.py安装

I ran into this same problem and I finally fixed it. 我遇到了同样的问题,终于解决了。 Make sure your command line tools are up to date and then build autopy from src. 确保您的命令行工具是最新的,然后从src构建autopy。 For Xcode 5.1 (OSX 10.9) and Xcode 5.1.1 (OSX 10.10), run the following to download and install the latest command line tools: 对于Xcode 5.1(OSX 10.9)和Xcode 5.1.1(OSX 10.10),请运行以下命令下载并安装最新的命令行工具:

xcode-select --install

Once finished, download autopy: 完成后,下载autopy:

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

Install autopy: 安装autopy:

cd autopy && sudo python setup.py install

Install Spynner using pip: 使用pip安装Spynner:

sudo pip install spynner

Hopefully this saves someone out there some time in the future! 希望这可以在将来节省一些时间! **Note: In the past I already had the command line tools installed. **注意:过去我已经安装了命令行工具。 Since I just updated to 10.10, it appears that I had to reinstall them. 由于我刚刚更新到10.10,因此似乎必须重新安装它们。 Makes sense. 说得通。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM