Linux : unable to install kivy in virtual environment
kivy, linux, python, python-2.7, virtualenv
Solution
This is happening because you do not have dependency libraries installed on your system, specifically the ones for OpenGL - most likely you do not have mesa packages installed.
Follow the instructions for your specific distribution on how to install all of the needed dependencies at: https://kivy.org/docs/installation/installation-linux.html#using-software-packages
Problem
I am using python2.7 and created a virtual environment 'kivyenv'. First i install Cython and then kivy in kivyenv. ``` pip install Cython pip install kivy ``` kivy failed to install giving some error :- ``` In file included from /tmp/pip-build-4T9oG4/kivy/kivy/graphics/opengl.c:274:0: /tmp/pip-build-4T9oG4/kivy/kivy/graphics/gl_redirect.h:43:22: fatal error: GL/gl.h: No such file or directory # include <GL/gl.h> ^ compilation terminated. error: command 'x86_64-linux-gnu-gcc' failed with exit status 1 ---------------------------------------- Command "/root/kivyenv/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-4T9oG4/kivy/setup.py'; exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-3__DxE-record/install-record.txt --single-version-externally-managed --compile --install-headers /root/kivyenv/include/site/python2.7/kivy" failed with error code 1 in /tmp/pip-build-4T9oG4/kivy/ ``` I am using Ubuntu 16.