Cygwin gcc问题 - 无法找到Python.h [英] Cygwin gcc issue - cannot find Python.h

查看:375
本文介绍了Cygwin gcc问题 - 无法找到Python.h的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我下载了Cygwin在Windows上构建Matplotlib。运行后,


python setup.py build

我收到一条消息,说Python.h无法找到( pastebin )。



在/usr/include/python2.7中,我可以清楚地看到Python.h的存在。



当我这样做时:


gcc -print-search-dirs p>

我在cygwin安装文件夹之外获得了一些Haskell文件夹的路径。 此处

在cygwin中确保安装了python-devel软件包:




  • 运行cygwin安装程序(setup-x86(_64))。

  • 点击进入页面以安装软件包
  • 从python部分安装python-devel软件包。在Python部分有一些可用的python2-devel或python3-devel。


So I downloaded Cygwin to build Matplotlib on Windows. Upon running

python setup.py build

I get a message saying Python.h cannot be found (pastebin).

Looking in /usr/include/python2.7, I can clearly see Python.h exists.

When I do:

gcc -print-search-dirs

I get paths to some Haskell folder outside of the cygwin installation folder. Full output here.

解决方案

in cygwin make sure the python-devel package is installed:

  • Run the cygwin installer (setup-x86(_64).exe
  • Click through until you get to the page to install packages
  • install the "python-devel" package from the "python" section. [Update from Comments] It is available as python2-devel or python3-devel under Python section for some.

这篇关于Cygwin gcc问题 - 无法找到Python.h的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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