我在尝试" pip install glpk"时遇到以下错误但我得到了一系列错误。这与帖子22135568不同,后者实际上是用我使用的命令解决的。
错误如下:
In file included from src/lp.c:24:
src/kkt.h:30:3: error: unknown type name 'LPXKKT'
LPXKKT kkt;
^
src/lp.c:182:18: warning: implicit declaration of function 'lpx_read_model' is invalid in C99 [-Wimplicit-function-declaration]
self->lp = lpx_read_model(model[0], model[1], model[2]);
^
src/lp.c:182:16: warning: incompatible integer to pointer conversion assigning to 'glp_prob *' (aka 'struct glp_prob *') from 'int' [-Wint-conversion]
self->lp = lpx_read_model(model[0], model[1], model[2]);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/lp.c:338:7: warning: implicit declaration of function 'lpx_read_bas' is invalid in C99 [-Wimplicit-function-declaration]
if (lpx_read_bas(LP, bas_filename)) {
^
src/lp.c:349:8: error: use of undeclared identifier 'LPX_E_OK'
case LPX_E_OK: Py_RETURN_NONE;
^
我已经尝试过自制软件但是没有安装glpk。对于上下文,我使用的是iPython笔记本。