SCIP Python Installation Issue Windows with pip

一曲冷凌霜 提交于 2019-12-11 04:46:28

问题


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: http://imgur.com/a/mJRva

Help is very much appreciated, Kind regards


回答1:


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.




回答2:


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



来源:https://stackoverflow.com/questions/44183891/scip-python-installation-issue-windows-with-pip

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!