Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cglpk cython compile error #138

Closed
0xaf1f opened this issue Jan 8, 2015 · 5 comments
Closed

cglpk cython compile error #138

0xaf1f opened this issue Jan 8, 2015 · 5 comments

Comments

@0xaf1f
Copy link
Contributor

0xaf1f commented Jan 8, 2015

Hi,
I tried to install the latest version via pip and I get a compiler error on the cython file. When I run cobra after this installation, only glpk is in cobra.solvers (not cglpk).
Downloading cobra-0.3.0.tar.gz (2.3Mb): 2.3Mb downloaded
Running setup.py egg_info for package cobra

Error compiling Cython file:
------------------------------------------------------------
...
# Do not want to print out to terminal. Even when not verbose, output
# will be redirected through the hook.
glp_term_out(GLP_OFF)


cdef int hook(void *info, const char *s):
                                    ^
------------------------------------------------------------

cobra/solvers/cglpk.pyx:92:37: Expected ')', found '*'
Compiling cobra/solvers/cglpk.pyx because it changed.
Cythonizing cobra/solvers/cglpk.pyx

Do you also see this problem? I was getting this error before, but I needed QSOpt to work, so I had written my own interface to that solver using the regular glpk bindings.

@aebrahim
Copy link
Member

aebrahim commented Jan 8, 2015

Hello!

To help debug this, can you let me know:

  1. What OS are you using?
  2. What version of Cython?
  3. What version of GLPK (and how was it installed)?

@0xaf1f
Copy link
Contributor Author

0xaf1f commented Jan 8, 2015

I'm sorry for the lack of information-- I was first just wondering if it was a simple syntax error that might be easily reproducible. I'm using Debian 7, Cython version 0.15.1, and GLPK v.4.45-- both installed through the package manager. I've never had any trouble using glpk with cobra before.

@aebrahim
Copy link
Member

aebrahim commented Jan 8, 2015

My suggestion is to update Cython. I use version 0.21.2

@0xaf1f
Copy link
Contributor Author

0xaf1f commented Jan 8, 2015

Ok, I just updated to Cython 0.19.1 through Debian stable backports and that solved the problem. Thanks for your prompt help!

@0xaf1f 0xaf1f closed this as completed Jan 8, 2015
@aebrahim
Copy link
Member

aebrahim commented Jan 8, 2015

No problem.

aebrahim added a commit that referenced this issue Jan 9, 2015
* Update Instructions
* Handle old versions of Cython, which caused issue #138
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants