J'essaye d'obtenir mod_wsgi 3.3
travailler. Lorsque j'exécute make
, cela me dit que je manque le package de développement Python. Comment puis-je obtenir et installer le package de développement Python ?
L'erreur que j'obtiens est la suivante:
mod_wsgi.c:135:20: error: Python.h: No such file or directory
mod_wsgi.c:138:2: error: #error Sorry, Python developer package does not appear to be installed.
mod_wsgi.c:142:2: error: #error Sorry, mod_wsgi requires at least Python 2.3.0 for Python 2.X.
mod_wsgi.c:150:2: error: #error Sorry, mod_wsgi requires that Python supporting thread.
mod_wsgi.c:153:21: error: compile.h: No such file or directory
mod_wsgi.c:154:18: error: node.h: No such file or directory
mod_wsgi.c:155:20: error: osdefs.h: No such file or directory
Système (instance Amazon EC2)
yum install python-devel
marchera.
Si yum
ne fonctionne pas, utilisez
apt-get install python-dev
Si vous utilisez la recherche yum, vous pouvez trouver le paquet dev python dev pour votre version de python.
Pour moi, j'utilisais python 3.5. J'ai exécuté ce qui suit
yum search python | grep devel
Qui a renvoyé ce qui suit
J'ai ensuite pu installer le package correct pour ma version de python avec la cmd suivante.
Sudo yum install python35u-devel.x86_64
Cela fonctionne sur les centos pour Ubuntu ou Debian dont vous auriez besoin pour utiliser apt-get
Pour moi, aucun des packages mentionnés ci-dessus n'a aidé.
J'ai finalement réussi à installer lxml
après avoir exécuté:
Sudo apt-get install python3.5-dev