Search code examples
installationscipmacos-venturavscode-pythonpyscipopt

Installation error for PySCIPOpt in vscode Mac Ventura OS


I am working on a Mixed Interger Linear Programming problem. I wanted to use SCIP solver to find the optimised solution for my problem. I was trying to install "PySCIPOpt" package in vscode which resulted in the following error.

error while running python3 -m pip install PySCIPOpt command in zsh shell in vscode editor

I tried the following which did not help

  • upgrade pip like mentioned in a lot of other posts
  • upgrade or install setuptools and wheel

But neither of the upgrades worked.

I also tried to install gcc via brew which did not resolve the error.


Solution

  • I did some research and found the following link for the above problem https://imada.sdu.dk/u/marco/DM871/PySCIPOpt/md_INSTALL.html

    As per the instructions in the link, I first installed SCIP using brew (brew install scip) within the Python virtual environment created for the project. SCIP installation via brew is successful (https://formulae.brew.sh/formula/scip)

    Going back to the steps mentioned in the above-link, export the SCIP installation path (installation details of any installed package can be found by running brew info ). Re-try running the command python3 -m pip install PySCIPOpt in zsh shell within vscode after exporting the SCIP directory, now PySCIPOpt installation is successful