1

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.stack.imgur.com/1K5Di.jpg

Help is very much appreciated, Kind regards

credential
  • 11
  • 3
  • Sorry for your troubles. I think the guys successfully tested this with a Windows 10 Bash compiled SCIP Optimization Suite. Is it an option for you to switch to Bash and compile the SCIP Optimization Suite there, and then proceed with pip as you described? – Gregor May 26 '17 at 07:25
  • Hi @Gregor, thank you very much for your answer. I downloaded cygwin to compile the optimization suite. However, I got stuck again at: src/rational.h:32:17: fatal error: gmp.h: No such file or directory Is it also possible to use a compiled version from your colleagues (best case scenario: i can download a zip > extract it and use it)? If yes, who do I need to contact to get the compiled version / is there one out there? Cheers! – credential May 26 '17 at 15:04
  • Sorry, I did not see your comment until now. It seems you have resolved your issue as described in your answer. Concerning downloads, we can provide what we have on our download page (also Windows libraries) Contact us at ZIB (see scip.zib.de#contact) if you need something different and we can see what we can do. – Gregor Jun 08 '17 at 14:15

2 Answers2

0

The error message says your missing "stdint.h". This is because you don't have a recent Visual Studio version. You probably use the one that came with your Python installation. Try installing the latest Visual Studio to fix this issue.

You might want to look at this question: Why Microsoft Visual Studio cannot find <stdint.h>?

PySCIPOpt needs a C/C++ linker to build the Python module - although it's already precompiled on PyPI.

mattmilten
  • 6,242
  • 3
  • 35
  • 65
  • Hi @mattmilten, thanks for your comment! I have now installed MSVS2017 and the DevCMD. Trying to use pip / easy_install sadly leads me to a new error. Did I understand you correctly that I need to start pip within the VS CMD? The error message can be found here: https://www.dropbox.com/s/cyxlusw0zbnhmxd/scip_issue.txt?dl=0 – credential May 27 '17 at 16:35
  • If I misunderstood you, what do I need to do in Visual Studio / outside of Visual Studio to proceed? What is the easiest way to get it to work? – credential May 27 '17 at 16:51
  • I managed to install and run it from the Windows command line. Just hit Windows+r und type cmd or type cmd in your start menu. You might also try the cmd that comes with Anaconda – mattmilten May 27 '17 at 17:03
  • running normal cmd > win r then cmd > leads to the same stdint.h error as before. Are you using python 2 or 3 btw.? – credential May 27 '17 at 17:21
0

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

credential
  • 11
  • 3