小牛中glpk的Pip安装错误?

2024-04-25 07:16:26 发布

您现在位置:Python中文网/ 问答频道 /正文

我在尝试“pip install glpk”时遇到以下错误,但是我得到了一系列错误。这不像post 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笔记本。在


Tags: offromsrcreadmodel错误functionerror