Can';“找不到”;Python.h";安装Watchman时的文件
我使用LinuxMint17'Quiana',我想安装Watchman以便稍后使用Ember.js。我的步骤如下:Can';“找不到”;Python.h";安装Watchman时的文件,python,linux,watchman,Python,Linux,Watchman,我使用LinuxMint17'Quiana',我想安装Watchman以便稍后使用Ember.js。我的步骤如下: $ git clone https://github.com/facebook/watchman.git 然后 当我运行make编译文件时,它返回了以下错误: pywatchman/bser.c:31:20: fatal error: Python.h: no such file or directory #include <Python.h>
$ git clone https://github.com/facebook/watchman.git
然后
当我运行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
但它似乎已经在我的系统中。我做错了什么?通常是缺少
pythondev
libs。您确定配置使用的是python 3而不是python 2吗?因为如果是这样的话,你应该安装python-dev
,而不是python3-dev
,如果你在rasbian/raspberry下构建watchman,同样的问题也会出现。安装“pythondev”
--
我也有
sudo apt-get install python3-dev
它仍然给我错误,然后我运行这个命令
sudo apt-get install python-dev
在那之后
make
sudo make install
在Fedora 32上运行:
sudo dnf install python devel
您是否也尝试过安装libpython3 dev
?通常它缺少python dev libs。您确定配置使用的是python 3而不是python 2吗?因为如果是这种情况,您应该安装pythondev
,而不是python3dev
@NilsWerner python3 dev应该安装libpython3 dev
作为依赖项。如果这样的话,我猜也是Python 2/3配置问题。您需要的是Python dev,而不是python3-dev。Watchman使用python2@Tomax,所以您是对的,这就是问题所在-我必须安装Python2dev
,现在它可以工作了。谢谢在Fedora 24上,您需要为CENTOS安装sudo dnf install python devel
sudo yum install python devel
sudo apt-get install python3-dev
sudo apt-get install python-dev
make
sudo make install