【发布时间】:2014-09-23 02:06:48
【问题描述】:
我是python的初学者,最近我想在我的Mac(小牛队,10.9.4)中安装autopy。 我阅读了许多介绍和其他人的问题。但我仍然无法成功安装 autopy。我安装 autopy 的步骤如下:
- 我已经从http://ethan.tira-thompson.com/Mac_OS_X_Ports.html 安装了libpng
- 我是初学者,我检查了 /Library/Frameworks 和 /usr/local,我 认为我已经正确安装了 libpng
- [终端]
git clone git://github.com/msanders/autopy.git - 根据介绍,我在autopy文件“src/screengrab.c”的第七行写
#include <OpenGL/gl.h> - [终端]
cd autopy - [终端]
python setup.py build
这里是命令窗口
src/png_io.c:3:10: fatal error: 'png.h' file not found
#include <png.h>
^
1 error generated.
error: command 'cc' failed with exit status 1
我需要重写png_io.c中“png.h”的文件地址吗?在Mac上安装autopy应该怎么做?我有一些重要的遗漏吗?
【问题讨论】:
-
如果我正确理解了 libpng 页面,libpng 会将其头文件安装在
/usr/local/include/libpng中,并将其库安装在/usr/local/lib中。您需要将autopy的设置过程指向这些路径。
标签: python macos unix opengl libpng