Search code examples
scip

SCIP Python Installation Issue Windows with pip


Hello community / developers,

I am currently trying to install SCIP with python and found that there is Windows Support and a pip installer based on https://github.com/SCIP-Interfaces/PySCIPOpt/blob/master/INSTALL.md.

Nevertheless I run into a problem "Cannot open include file"

Below is a list of the things I performed to get to this step.

  1. Download Python Anaconda 2.7 64 bit
  2. Install with all checkboxes as they are
  3. Download PyCharm Community edition
  4. Click 64 bit desktop link, and associate with .py checkboxes
  5. Open CMD > write: easy_install -U pip
  6. Download Visual C++ Compiler for Python 2.7
  7. Setup folder structure and downloaded header files
  8. CMD > pip install pyscipopt leads to error:

    C:\Users\UserName\Downloads\SCIPOPTDIR\include\scip/def.h(32) : fatal error C1083: Cannot open include file: 'stdint.h': No such file or directory error: command 'C:\Users\UserName\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\cl.exe' failed with exit status 2

My environment variables and folder directory can be found here: https://i.sstatic.net/1K5Di.jpg

Help is very much appreciated, Kind regards


Solution

  • Alright, I figured it out. I needed to

    (1) Install Python 3.6 instead of Python 2.7 (both Anaconda) (2) Afterwards pip installation worked (3) I moved the library files in the lib folder (4) Now I can execute the examples.

    Interestingly, I get an unresolved reference error although the code works fine (I assume this is a bug of Pycharm/scipy?) Link to picture: https://www.dropbox.com/s/d8pf6dkwuz9cwto/scip_python.png?dl=0