LoginSignup
1
0

More than 1 year has passed since last update.

M1 Mac に Python MIP をインストール

Posted at

name 'cbclib' is not defined に悩まされている人へ

  • bash か zsh か確認するべし
  • 私は zsh なのにずっと ~/.bashrc に書き込んでいて時間を溶かした

手順

  1. ターミナルを開き、bash か zsh か確認
  2. coinbrew による Cbc のビルド (ターミナル上)
    1. cd
    2. git clone https://github.com/coin-or/coinbrew.git
    3. cd coinbrew
    4. ./coinbrew fetch build Cbc@master --no-prompt --prefix=/usr/local --tests=none --enable-cbc-parallel
  3. zsh の人
    1. cd
    2. touch .zshrc
    3. 以下を書き込む
  4. bash の人
    1. cd
    2. touch .zshrc
    3. 以下を書き込む
export PMIP_CBC_LIBRARY="/usr/local/lib/libCbc.dylib"
export LD_LIBRARY_PATH="/home/haroldo/prog/lib/":$LD_LIBRARY_PATH
  • あとは、pip install mipで、Python-MIP のインストールをすれば完了

参考

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0