2016-05-18 30 views
11

Uso Linux Mint 17 'Quiana' e voglio installare Watchman per utilizzare successivamente Ember.js. Qui sono stati i miei passi:Impossibile trovare il file "Python.h" durante l'installazione di Watchman

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

poi

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

e, quando mi sono imbattuto make per compilare i file, è restituito il seguente errore:

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 

ho provato a correre

$ sudo apt-get install python3-dev 

ma esso sembra essere già nel mio sistema. Cosa ho fatto di sbagliato?

+0

Hai provato l'installazione di 'libpython3-dev', troppo? –

+1

Di solito le sue lib di python-dev mancano. Sei sicuro che il configure usi python 3 invece di python 2? Perché se questo è il caso dovresti installare 'python-dev' invece di' python3-dev'. @NilsWerner python3-dev dovrebbe installare 'libpython3-dev' come dipendenza. – Tomax

+0

Beh, se la mia ipotesi sarebbe anche un problema di configurazione Python 2/3. –

risposta

28

Di solito sono mancate le librerie python-dev. Sei sicuro che il configure usi python 3 invece di python 2? Perché se questo è il caso, è necessario installare python-dev anziché python3-dev.

+0

Grazie per averlo provato. Spero che questo funzioni – Pavan

+1

Su Fedora 24 hai bisogno di 'sudo dnf install python-devel'. – donleche

+0

'sudo yum installa python-devel' per CENTOS – Billz

7

Lo stesso problema se si costruisce watchman sotto rasbian/lampone. Installa "python-dev".

-

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

sudo make install 
Problemi correlati