[英]Can't find “Python.h” file while installing 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
但它似乎已经在我的系统中。 我做错了什么?
通常它缺少python-dev
库。 你确定配置使用 python 3 而不是 python 2? 因为如果是这种情况,您应该安装python-dev
而不是python3-dev
。
如果你在 rasbian/raspberry 下构建 watchman,同样的问题。 安装“python-dev”。
——
git clone https://github.com/facebook/watchman.git
cd watchman
./autogen.sh
./configure
make
sudo make install
我也做了
sudo apt-get install python3-dev
它仍然给我错误然后我运行了这个命令
sudo apt-get install python-dev
在那之后。
make
sudo make install
在 Fedora 32 上运行: sudo dnf install python-devel
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.