Created
June 18, 2022 22:04
-
-
Save murphyyhuang/62f1fc67e2a0b02eea762f214f36ca03 to your computer and use it in GitHub Desktop.
Install cvxopt with glpk optimizer on Apple Silicon
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For a later reference | |
# Seems like not wheel for macOS M1 has been provided: https://github.com/cvxopt/cvxopt/issues/201 | |
# Manually install according to https://cvxopt.org/install/ | |
# Remember to specify the environment variables with the prefix 'CVXOPT_' | |
brew install gsl fftw suite-sparse glpk | |
git clone https://github.com/cvxopt/cvxopt.git | |
cd cvxopt | |
git checkout `git describe --abbrev=0 --tags` | |
export CVXOPT_BUILD_GLPK=1 | |
export CVXOPT_GLPK_LIB_DIR=/opt/homebrew/Cellar/glpk/5.0/lib/ | |
export CVXOPT_GLPK_INC_DIR=/opt/homebrew/Cellar/glpk/5.0/include/ | |
python setup.py install | |
# test: | |
# in python: from cvxopt import glpk |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment