Cbc icon indicating copy to clipboard operation
Cbc copied to clipboard

cbc on Mac M1 Monterey 12.3.1

Open NoCh-Git opened this issue 3 years ago • 3 comments

Hi, I've been trying to install cbc on my MacBook air 2020 M1 Monterey 12.3.1 for a few days now and haven't succeeded yet. When using brew I get: ==> cbc cbc is keg-only, which means it was not symlinked into /opt/homebrew, because conflicts with formula in core.

If you need to have cbc first in your PATH, run: echo 'export PATH="/opt/homebrew/opt/cbc/bin:$PATH"' >> ~/.zshrc

For compilers to find cbc you may need to set: export LDFLAGS="-L/opt/homebrew/opt/cbc/lib" export CPPFLAGS="-I/opt/homebrew/opt/cbc/include"

For pkg-config to find cbc you may need to set: export PKG_CONFIG_PATH="/opt/homebrew/opt/cbc/lib/pkgconfig"

I added the needed paths but it still didn't work!

Then I used conda [conda install coin-or-cbc coincbc following this page instruction] for the installation and it gives me:

Collecting package metadata (current_repodata.json): done Solving environment: | The environment is inconsistent, please check the package plan carefully The following packages are causing the inconsistency:

  • /osx-arm64::coin-or-cbc==2.10.7=h616599d_0 failed with initial frozen solve. Retrying with flexible solve. Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source. Collecting package metadata (repodata.json): done Solving environment: - The environment is inconsistent, please check the package plan carefully The following packages are causing the inconsistency:

  • /osx-arm64::coin-or-cbc==2.10.7=h616599d_0

And it repeats this cycle forever (at least 2-3h) Did anyone else have similar issues?

NoCh-Git avatar May 05 '22 12:05 NoCh-Git

You should really file this issue over in https://github.com/conda-forge/coin-or-cbc-feedstock, not here. I have also run into similar issues with conda when trying to install coin-or-cbc in my base environment. It seems that conda cannot find a combination of package versions that satisfies all requirements of all installed packages. This is basically unrelated to Cbc and there is not much we can do. Mamba is a drop-in replacement that tries to fix some of the design issues with conda and might work better. But the easiest solution is to just start fresh with a new virtual environment. Then it should work fine. It will save you a lot of headaches if you just do

conda create -n cbc coin-or-cbc
conda activate cbc

tkralphs avatar May 05 '22 15:05 tkralphs

I have the same OS and chip, and when I use brew per the README:

brew tap coin-or-tools/coinor
brew install coin-or-tools/coinor/cbc

it hangs indefinitely on

==> Downloading https://ghcr.io/v2/homebrew/core/metis/blobs/sha256:9924dff9c2995788c3e69a1affb9931035b66af7b2fef57fedbb0b2f14071d9f
Already downloaded: /Users/nick/Library/Caches/Homebrew/downloads/aaee475d856217357f2ae2da3d08e2cb15a83b7b2ef289ba07138319902ee499--metis--5.1.0.arm64_monterey.bottle.tar.gz

nlaws-camus avatar Sep 19 '22 20:09 nlaws-camus

See #529, but this is not an issue with Cbc and should be filed at https://github.com/coin-or-tools/homebrew-coinor/issues.

tkralphs avatar Sep 19 '22 22:09 tkralphs