fatal error: Python.h: No such file or directory when installing applications from requirements
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
senlin |
Opinion
|
Undecided
|
zzxwill |
Bug Description
OS: CentOS Linux release 7.1.1503 (Core)
Python: Python 2.7.5 (default, Nov 20 2015, 02:00:19)
Error:
When running "pip install -r requirements.txt", error occurred.
Collecting fasteners>=0.7 (from oslo.concurrenc
Using cached fasteners-
Installing collected packages: greenlet, eventlet, WebOb, six, oslo.i18n, msgpack-python, funcsigs, monotonic, wrapt, debtcollector, netifaces, netaddr, iso8601, oslo.utils, oslo.serialization, requests, stevedore, oslo.config, positional, keystoneauth1, python-
Running setup.py install for greenlet ... error
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;
running install
running build
running build_ext
building 'greenlet' extension
creating build
creating build/temp.
gcc -pthread -fno-strict-
In file included from greenlet.c:5:0:
greenlet.
#include <Python.h>
compilation terminated.
error: command 'gcc' failed with exit status 1
---
Command "/usr/bin/python -u -c "import setuptools, tokenize;
Analysis:
The root cause might be that installing eventlet depends on python-dev.
Changed in senlin: | |
assignee: | nobody → zzxwill (zzxwill) |
Changed in senlin: | |
status: | New → Opinion |
The same error was occurred in my environment too, but it gets resolved by changing the default python from python2.7 to python3.4, and after that updated the tox.