我已经安装了libpng,但是出现错误“找不到'png.h'文件#include< png.h>"当我安装自动程序时 [英] I have already installed libpng, but there is an error " 'png.h' file not found #include <png.h>" when I am installing the autopy

查看:764
本文介绍了我已经安装了libpng,但是出现错误“找不到'png.h'文件#include< png.h>"当我安装自动程序时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是python的初学者,最近我想在我的Mac(Mavericks,10.9.4)中安装autopy. 我读了许多介绍和其他人的问题.但是我仍然无法成功安装自动py.我安装自动程序的步骤如下:

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:

  1. 我已经从 http://ethan.tira-thompson.com/Mac_OS_X_Ports安装了libpng .html
  2. 我是初学者,我检查了/Library/Frameworks和/usr/local,然后 认为我已经正确安装了libpng
  3. [终端] git clone git://github.com/msanders/autopy.git
  4. 根据介绍,我在自动文件"src/screengrab.c"的第七行写了#include <OpenGL/gl.h>
  5. [Terminal] cd autopy
  6. [Terminal] python setup.py build
  1. I have installed the libpng from the http://ethan.tira-thompson.com/Mac_OS_X_Ports.html
  2. I am beginner, I check the /Library/Frameworks and /usr/local and I think I have installed the libpng correctly
  3. [Terminal]git clone git://github.com/msanders/autopy.git
  4. According to the introduction, I write #include <OpenGL/gl.h> at the seventh line of the autopy file "src/screengrab.c"
  5. [Terminal]cd autopy
  6. [Terminal]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上安装自动程序该怎么办?我有一些重要的遗漏吗?

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

  1. sudo apt-get install libx11-dev 解决"#include"未找到错误
  2. sudo apt-get install libxtst-dev解决"#include"未找到错误
  3. sudo apt-get install libpng-dev解决"#include"未找到错误
  4. easy_install autopy
  1. sudo apt-get install libx11-dev to resolve "#include " not found error
  2. sudo apt-get install libxtst-dev to resolve "#include " not found error
  3. sudo apt-get install libpng-dev to resolve "#include " not found error
  4. easy_install autopy

这篇关于我已经安装了libpng,但是出现错误“找不到'png.h'文件#include&lt; png.h&gt;&quot;当我安装自动程序时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆