问题描述
我是python的初学者,最近我想在我的Mac(Mavericks,10.9.4)中安装autopy.我阅读了许多介绍和其他人的问题.但是我仍然无法成功安装 autopy.我安装 autopy 的步骤如下:
I am a beginner at python, recently I want to install autopy in my Mac (Mavericks,10.9.4). I read many introductions and other people's questions. But I still cannot install the autopy successfully. My steps to install the autopy are as below:
- 我已经从 http://ethan.tira-thompson.com/Mac_OS_X_Ports 安装了 libpng.html
- 我是初学者,我检查了/Library/Frameworks 和/usr/local 并且我认为我已经正确安装了 libpng
- [终端]
git clone git://github.com/msanders/autopy.git
- 根据介绍,我在autopy文件src/screengrab.c"的第七行写了
#include
- [终端]
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应该怎么做?有什么重要的遗漏吗?
Do I need to rewrite the file address of "png.h" in the png_io.c?And what should I do to install the autopy on Mac?Do I have some important Omissions?
推荐答案
尝试:
sudo apt-get install libpng-dev
我现在正在安装 autopy,并停留在同一步骤.安装libpng-dev后,问题解决.:)
I am installing autopy right now, and stuck at the same step. And after installing libpng-dev, the problem resolved. :)
安装autopy的完整过程如下
The full process to install autopy is as follow
sudo apt-get install libx11-dev
解决#include"未找到错误sudo apt-get install libxtst-dev
解决#include"未找到错误sudo apt-get install libpng-dev
解决#include"未找到错误easy_install autopy
sudo apt-get install libx11-dev
to resolve "#include " not found errorsudo apt-get install libxtst-dev
to resolve "#include " not found errorsudo apt-get install libpng-dev
to resolve "#include " not found erroreasy_install autopy
这篇关于我已经安装了libpng,但是出现一个错误"找不到“png.h"文件#include <png.h>"当我安装 autopy 时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!