无法找到" Python.h"安装Watchman时的文件

时间:2016-05-18 10:53:24

标签: python linux watchman

我使用Linux Mint 17' Quiana'我想安装Watchman以便以后使用Ember.js。这是我的步骤:

$ git clone https://github.com/facebook/watchman.git

然后

$ cd watchman
$ ./autogen.sh
$ ./configure.sh

并且,当我运行make来编译文件时,它返回了以下错误:

pywatchman/bser.c:31:20: fatal error: Python.h: no such file or directory
#include <Python.h>
                ^
compilation terminated.
error: command 'i686-linux-gnu-gcc' failed with exit status 1
make[1]: *** [py-build] Error 1
make[1]: Leaving the directory `/home/alex/watchman'
make: *** [all] Error 2

我试图运行

$ sudo apt-get install python3-dev

但似乎已经存在于我的系统中。我做错了什么?

4 个答案:

答案 0 :(得分:42)

通常缺少python-dev个库。你确定configure使用python 3而不是python 2吗?因为如果是这种情况,您应该安装python-dev而不是python3-dev

答案 1 :(得分:7)

如果你在rasbian / raspberry下建立守望者,同样的问题。安装“python-dev”。

-

git clone https://github.com/facebook/watchman.git
cd watchman
./autogen.sh
./configure
make

sudo make install

答案 2 :(得分:3)

我也做了

<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.5.11/p5.min.js"></script>

它仍然给我错误然后我运行了这个命令

sudo apt-get install python3-dev

之后。

sudo apt-get install python-dev

答案 3 :(得分:0)

在Fedora 32上运行: sudo dnf install python-devel

相关问题