I believe this may be a general python/gcc problem not specific to pyglpk.
I'm trying install to pyglpk on a fresh install of Ubuntu 14.04. As I'm using a fresh install of Ubuntu both Python 2.7 and 3 are installed. I believe I've properly installed the listed required dependencies (GLPK and GMP) and I've installed the additional dependencies which another post suggested I might be missing:
apt-get install python-dev libxml2-dev libxslt-dev
Here is the error i get when trying to compile pyglpk:
sudo make
python setup.py build
running build
running build_ext
building 'glpk' extension
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/local/include -Isrc -I/usr/include/python2.7 -c src/glpk.c -o build/temp.linux-x86_64-2.7/src/glpk.o -m32
In file included from /usr/include/python2.7/Python.h:8:0,
from src/glpk.c:20:
/usr/include/python2.7/pyconfig.h:7:49: fatal error: i386-linux-gnu/python2.7/pyconfig.h: No such file or directory
# include <i386-linux-gnu/python2.7/pyconfig.h>
^
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
make: *** [all] Error 1
It looks to me like the actual file it's looking for (pyconfig.h) is here:
/usr/include/x86_64-linux-gnu/python2.7/pyconfig.h
while make/gcc seems to be looking for the equivalent file for 32 bit python:
/usr/include/i386-linux-gnu/python2.7/pyconfig.h
I'm going to try installing 32 bit Ubuntu instead, even though I should be able to use 32 bit programs on a 64 bit system. I'll report back here.
Thanks!