os : linux(ubuntu 16.04 LTS, 64-bit) python_version : 3.6.3
- Using virtualenv.
- I tried to install many version of kivy with many different versions of cython but always i got same error which is like below.
- After giving "pip install kivy" this install some packages: certifi (2017.11.5) chardet (3.0.4) Cython (0.26) docutils (0.14) idna (2.6) Kivy-Garden (0.1.4) pip (9.0.1) Pygments (2.2.0) requests (2.18.4) setuptools (38.4.0) urllib3 (1.22) wheel (0.30.0)
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/tmp/pip-build-c8ofsvs6/kivy/kivy/include -I/usr/include/python3.6m -I/home/ubuntu/venv/include/python3.6m -c /tmp/pip-build-c8ofsvs6/kivy/kivy/_event.c -obuild/temp.linux-x86_64-3.6/tmp/pip-build-c8ofsvs6/kivy/kivy/_event.o /tmp/pip-build-c8ofsvs6/kivy/kivy/_event.c:4:20: fatal error: Python.h: No such file or directory compilation terminated. error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
---------------------------------------- Failed building wheel for kivy Running setup.py clean for kivy Failed to build kivy Installing collected packages: kivy Running setup.py install for kivy ... error Complete output from command /home/ubuntu/venv/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-c8ofsvs6/kivy/setup.py';f=getattr(tokenize,'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-vcdy_iv_-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/ubuntu/venv/include/site/python3.6/kivy: Using distutils
and last
> > Detected compiler is unix
> > skipping '/tmp/pip-build-c8ofsvs6/kivy/kivy/_event.c' Cython extension (up-to-date)
> > building 'kivy._event' extension
> > creating build/temp.linux-x86_64-3.6
> > creating build/temp.linux-x86_64-3.6/tmp
> > creating build/temp.linux-x86_64-3.6/tmp/pip-build-c8ofsvs6
> > creating build/temp.linux-x86_64-3.6/tmp/pip-build-c8ofsvs6/kivy
> > creating build/temp.linux-x86_64-3.6/tmp/pip-build-c8ofsvs6/kivy/kivy
> > x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/tmp/pip-build-c8ofsvs6/kivy/kivy/include -I/usr/include/python3.6m -I/home/ubuntu/venv/include/python3.6m -c /tmp/pip-build-c8ofsvs6/kivy/kivy/_event.c -o
> > build/temp.linux-x86_64-3.6/tmp/pip-build-c8ofsvs6/kivy/kivy/_event.o
> > /tmp/pip-build-c8ofsvs6/kivy/kivy/_event.c:4:20: fatal error: Python.h: No such file or directory
> > compilation terminated.
> > error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
> >
> > ---------------------------------------- Command "/home/ubuntu/venv/bin/python3 -u -c "import setuptools,
> > tokenize;__file__='/tmp/pip-build-c8ofsvs6/kivy/setup.py';f=getattr(tokenize,
> > 'open', open)(__file__);code=f.read().replace('\r\n',
> > '\n');f.close();exec(compile(code, __file__, 'exec'))" install
> > --record /tmp/pip-vcdy_iv_-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/ubuntu/venv/include/site/python3.6/kivy" failed with error code
> > 1 in /tmp/pip-build-c8ofsvs6/kivy/
- I have also tried with cython 0.25.2