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

How to build cvxopt package with GLPK support #1085

Open
kmykman opened this issue Jan 27, 2024 · 1 comment
Open

How to build cvxopt package with GLPK support #1085

kmykman opened this issue Jan 27, 2024 · 1 comment
Labels

Comments

@kmykman
Copy link

kmykman commented Jan 27, 2024

I use cvoxpt in the public package repository. I need to use glpk in cvoxpt but I got error.

ImportError("cannot import name 'glpk' from 'cvxopt'")

I saw from this in part "Install with GLPK support", it needs to install GLPK and then install CVXOPT with GLPK bindings.

CVXOPT_BUILD_GLPK=1
CVXOPT_GLPK_LIB_DIR=/path/to/glpk-X.X/lib
CVXOPT_GLPK_INC_DIR=/path/to/glpk-X.X/include
pip install cvxopt

Is that only can be achieved by building a new whl file? If so, how should the metadata yaml file be written? I have tried

package:
  name: cvxopt
  version: "1.2.5"
requirements:
  host:
    -url: https://ftp.gnu.org/gnu/glpk/glpk-4.35.tar.gz

but seems like it is wrong.

@mhsmith mhsmith changed the title How to bind glpk with cvxopt package How to build cvxopt package with GLPK support Jan 28, 2024
@mhsmith
Copy link
Member

mhsmith commented Jan 28, 2024

If GLPK is a native library, then you'll have to build that as a separate package first, and then probably patch cvxopt to set these environment variables during the build.

See the chaquopy-libzmq and pyzmq examples mentioned in the README, and pay attention to the section about "If any changes are needed to make the build work"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants