我按照以下步骤操作,遇到了第一个错误:
wget http://www.dcc.fc.up.pt/~jpp/code/python-glpk/python-glpk_0.4.43.orig.tar.gz
tar -xzf python-glpk_0.4.43.orig.tar.gz
cd python-glpk-0.4.43/src/
sudo make install
我收到此错误:
make -C swig all
make[1]: pyversions: Command not found
gcc -Wall -c -fPIC glpkpi_wrap.c -DHAVE_CONFIG_H -I/usr/include/ -I/usr/lib//config
glpkpi_wrap.c:130:11: fatal error: 'Python.h' file not found
# include
^
1 error generated.
make[1]: *** [glpkpi_wrap.o] Error 1
make: *** [all] Error 2
然后我通过更改Python版本或下面的部分链接到python:
在swig / Makefile中
变了
PYVERS := $(shell pyversions -d)
至
PYVERS := "Python 2.7.6"
这是我的python版本
make -C swig all
swig -python glpkpi.i
./glpk.h:916: Warning 314: 'in' is a pytho