首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >m1 mac上的SCIP安装

问m1 mac上的SCIP安装
EN

Stack Overflow用户
提问于 2021-06-02 16:04:47
回答 1查看 669关注 0票数 0

我试图在我的m1 Mac上安装scip,运行在python3.7上。

我创建了一个运行在x86_64中的终端,并能够按照这些指示编译scip

直接编译SCIP可以如下所示:

  1. 打开tarball "tar xvzf scip-x.y.z.tgz“
  2. 转到"cd x.y.z“目录
  3. 开始编译SCIP "make“
  4. (推荐)检查SCIP安装“作出测试”

但我不知道下一步该怎么办。然后,我尝试,但是我得到了以下错误:

代码语言:javascript
复制
Collecting pyscipopt
  Using cached PySCIPOpt-3.1.5.tar.gz (623 kB)
Requirement already satisfied: wheel in /Users/chiennifer/.pyenv/versions/3.7.7/lib/python3.7/site-packages (from pyscipopt) (0.36.2)
Building wheels for collected packages: pyscipopt
  Building wheel for pyscipopt (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /Users/chiennifer/.pyenv/versions/3.7.7/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/b7/nnczj7h90wn8ds7ht2ljn2l80000gn/T/pip-install-7dve8tcz/pyscipopt_d6deb81abfa54b778aab0b28d10bb306/setup.py'"'"'; __file__='"'"'/private/var/folders/b7/nnczj7h90wn8ds7ht2ljn2l80000gn/T/pip-install-7dve8tcz/pyscipopt_d6deb81abfa54b778aab0b28d10bb306/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/b7/nnczj7h90wn8ds7ht2ljn2l80000gn/T/pip-wheel-f_3atwka
       cwd: /private/var/folders/b7/nnczj7h90wn8ds7ht2ljn2l80000gn/T/pip-install-7dve8tcz/pyscipopt_d6deb81abfa54b778aab0b28d10bb306/
  Complete output (39 lines):
  Using include path </private/var/folders/b7/nnczj7h90wn8ds7ht2ljn2l80000gn/T/pip-install-7dve8tcz/pyscipopt_d6deb81abfa54b778aab0b28d10bb306/src>.
  Using SCIP library <scip> at </private/var/folders/b7/nnczj7h90wn8ds7ht2ljn2l80000gn/T/pip-install-7dve8tcz/pyscipopt_d6deb81abfa54b778aab0b28d10bb306/lib>.
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.macosx-11.1-x86_64-3.7
  creating build/lib.macosx-11.1-x86_64-3.7/pyscipopt
  copying src/pyscipopt/Multidict.py -> build/lib.macosx-11.1-x86_64-3.7/pyscipopt
  copying src/pyscipopt/__init__.py -> build/lib.macosx-11.1-x86_64-3.7/pyscipopt
  copying src/pyscipopt/scip.pyx -> build/lib.macosx-11.1-x86_64-3.7/pyscipopt
  copying src/pyscipopt/scip.pxd -> build/lib.macosx-11.1-x86_64-3.7/pyscipopt
  copying src/pyscipopt/propagator.pxi -> build/lib.macosx-11.1-x86_64-3.7/pyscipopt
  copying src/pyscipopt/heuristic.pxi -> build/lib.macosx-11.1-x86_64-3.7/pyscipopt
  copying src/pyscipopt/event.pxi -> build/lib.macosx-11.1-x86_64-3.7/pyscipopt
  copying src/pyscipopt/lp.pxi -> build/lib.macosx-11.1-x86_64-3.7/pyscipopt
  copying src/pyscipopt/relax.pxi -> build/lib.macosx-11.1-x86_64-3.7/pyscipopt
  copying src/pyscipopt/benders.pxi -> build/lib.macosx-11.1-x86_64-3.7/pyscipopt
  copying src/pyscipopt/conshdlr.pxi -> build/lib.macosx-11.1-x86_64-3.7/pyscipopt
  copying src/pyscipopt/benderscut.pxi -> build/lib.macosx-11.1-x86_64-3.7/pyscipopt
  copying src/pyscipopt/nodesel.pxi -> build/lib.macosx-11.1-x86_64-3.7/pyscipopt
  copying src/pyscipopt/expr.pxi -> build/lib.macosx-11.1-x86_64-3.7/pyscipopt
  copying src/pyscipopt/branchrule.pxi -> build/lib.macosx-11.1-x86_64-3.7/pyscipopt
  copying src/pyscipopt/sepa.pxi -> build/lib.macosx-11.1-x86_64-3.7/pyscipopt
  copying src/pyscipopt/presol.pxi -> build/lib.macosx-11.1-x86_64-3.7/pyscipopt
  copying src/pyscipopt/pricer.pxi -> build/lib.macosx-11.1-x86_64-3.7/pyscipopt
  running build_ext
  building 'pyscipopt.scip' extension
  creating build/temp.macosx-11.1-x86_64-3.7
  creating build/temp.macosx-11.1-x86_64-3.7/src
  creating build/temp.macosx-11.1-x86_64-3.7/src/pyscipopt
  clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/usr/local/opt/openssl@1.1/include -I/usr/local/opt/bzip2/include -I/usr/local/opt/readline/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/usr/local/opt/openssl@1.1/include -I/usr/local/opt/bzip2/include -I/usr/local/opt/readline/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/usr/local/opt/zlib/include -I/usr/local/opt/bzip2/include -I/private/var/folders/b7/nnczj7h90wn8ds7ht2ljn2l80000gn/T/pip-install-7dve8tcz/pyscipopt_d6deb81abfa54b778aab0b28d10bb306/src -I/Users/chiennifer/.pyenv/versions/3.7.7/include/python3.7m -c src/pyscipopt/scip.c -o build/temp.macosx-11.1-x86_64-3.7/src/pyscipopt/scip.o
  In file included from src/pyscipopt/scip.c:635:
  In file included from /usr/local/include/scip/scip.h:35:
  /usr/local/include/scip/def.h:43:10: fatal error: 'scip/config.h' file not found
  #include "scip/config.h"
           ^~~~~~~~~~~~~~~
  1 error generated.
  error: command 'clang' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for pyscipopt
  Running setup.py clean for pyscipopt
Failed to build pyscipopt
Installing collected packages: pyscipopt
    Running setup.py install for pyscipopt ... error
    ERROR: Command errored out with exit status 1:
     command: /Users/chiennifer/.pyenv/versions/3.7.7/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/b7/nnczj7h90wn8ds7ht2ljn2l80000gn/T/pip-install-7dve8tcz/pyscipopt_d6deb81abfa54b778aab0b28d10bb306/setup.py'"'"'; __file__='"'"'/private/var/folders/b7/nnczj7h90wn8ds7ht2ljn2l80000gn/T/pip-install-7dve8tcz/pyscipopt_d6deb81abfa54b778aab0b28d10bb306/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/b7/nnczj7h90wn8ds7ht2ljn2l80000gn/T/pip-record-uyujqy4v/install-record.txt --single-version-externally-managed --compile --install-headers /Users/chiennifer/.pyenv/versions/3.7.7/include/python3.7m/pyscipopt
         cwd: /private/var/folders/b7/nnczj7h90wn8ds7ht2ljn2l80000gn/T/pip-install-7dve8tcz/pyscipopt_d6deb81abfa54b778aab0b28d10bb306/
    Complete output (39 lines):
    Using include path </private/var/folders/b7/nnczj7h90wn8ds7ht2ljn2l80000gn/T/pip-install-7dve8tcz/pyscipopt_d6deb81abfa54b778aab0b28d10bb306/src>.
    Using SCIP library <scip> at </private/var/folders/b7/nnczj7h90wn8ds7ht2ljn2l80000gn/T/pip-install-7dve8tcz/pyscipopt_d6deb81abfa54b778aab0b28d10bb306/lib>.
    running install
    running build
    running build_py
    creating build
    creating build/lib.macosx-11.1-x86_64-3.7
    creating build/lib.macosx-11.1-x86_64-3.7/pyscipopt
    copying src/pyscipopt/Multidict.py -> build/lib.macosx-11.1-x86_64-3.7/pyscipopt
    copying src/pyscipopt/__init__.py -> build/lib.macosx-11.1-x86_64-3.7/pyscipopt
    copying src/pyscipopt/scip.pyx -> build/lib.macosx-11.1-x86_64-3.7/pyscipopt
    copying src/pyscipopt/scip.pxd -> build/lib.macosx-11.1-x86_64-3.7/pyscipopt
    copying src/pyscipopt/propagator.pxi -> build/lib.macosx-11.1-x86_64-3.7/pyscipopt
    copying src/pyscipopt/heuristic.pxi -> build/lib.macosx-11.1-x86_64-3.7/pyscipopt
    copying src/pyscipopt/event.pxi -> build/lib.macosx-11.1-x86_64-3.7/pyscipopt
    copying src/pyscipopt/lp.pxi -> build/lib.macosx-11.1-x86_64-3.7/pyscipopt
    copying src/pyscipopt/relax.pxi -> build/lib.macosx-11.1-x86_64-3.7/pyscipopt
    copying src/pyscipopt/benders.pxi -> build/lib.macosx-11.1-x86_64-3.7/pyscipopt
    copying src/pyscipopt/conshdlr.pxi -> build/lib.macosx-11.1-x86_64-3.7/pyscipopt
    copying src/pyscipopt/benderscut.pxi -> build/lib.macosx-11.1-x86_64-3.7/pyscipopt
    copying src/pyscipopt/nodesel.pxi -> build/lib.macosx-11.1-x86_64-3.7/pyscipopt
    copying src/pyscipopt/expr.pxi -> build/lib.macosx-11.1-x86_64-3.7/pyscipopt
    copying src/pyscipopt/branchrule.pxi -> build/lib.macosx-11.1-x86_64-3.7/pyscipopt
    copying src/pyscipopt/sepa.pxi -> build/lib.macosx-11.1-x86_64-3.7/pyscipopt
    copying src/pyscipopt/presol.pxi -> build/lib.macosx-11.1-x86_64-3.7/pyscipopt
    copying src/pyscipopt/pricer.pxi -> build/lib.macosx-11.1-x86_64-3.7/pyscipopt
    running build_ext
    building 'pyscipopt.scip' extension
    creating build/temp.macosx-11.1-x86_64-3.7
    creating build/temp.macosx-11.1-x86_64-3.7/src
    creating build/temp.macosx-11.1-x86_64-3.7/src/pyscipopt
    clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/usr/local/opt/openssl@1.1/include -I/usr/local/opt/bzip2/include -I/usr/local/opt/readline/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/usr/local/opt/openssl@1.1/include -I/usr/local/opt/bzip2/include -I/usr/local/opt/readline/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/usr/local/opt/zlib/include -I/usr/local/opt/bzip2/include -I/private/var/folders/b7/nnczj7h90wn8ds7ht2ljn2l80000gn/T/pip-install-7dve8tcz/pyscipopt_d6deb81abfa54b778aab0b28d10bb306/src -I/Users/chiennifer/.pyenv/versions/3.7.7/include/python3.7m -c src/pyscipopt/scip.c -o build/temp.macosx-11.1-x86_64-3.7/src/pyscipopt/scip.o
    In file included from src/pyscipopt/scip.c:635:
    In file included from /usr/local/include/scip/scip.h:35:
    /usr/local/include/scip/def.h:43:10: fatal error: 'scip/config.h' file not found
    #include "scip/config.h"
             ^~~~~~~~~~~~~~~
    1 error generated.
    error: command 'clang' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /Users/chiennifer/.pyenv/versions/3.7.7/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/b7/nnczj7h90wn8ds7ht2ljn2l80000gn/T/pip-install-7dve8tcz/pyscipopt_d6deb81abfa54b778aab0b28d10bb306/setup.py'"'"'; __file__='"'"'/private/var/folders/b7/nnczj7h90wn8ds7ht2ljn2l80000gn/T/pip-install-7dve8tcz/pyscipopt_d6deb81abfa54b778aab0b28d10bb306/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/b7/nnczj7h90wn8ds7ht2ljn2l80000gn/T/pip-record-uyujqy4v/install-record.txt --single-version-externally-managed --compile --install-headers /Users/chiennifer/.pyenv/versions/3.7.7/include/python3.7m/pyscipopt Check the logs for full command output.
EN

回答 1

Stack Overflow用户

发布于 2021-06-04 07:14:40

PySCIPOpt与SCIP的Makefile系统不能很好地工作--您需要使用CMake构建SCIP,就像PySCIPOpt安装指南中提到的那样。然后,这将生成一个共享库和缺少的config.h头。

您是否已经尝试将预构建的conda软件包用于PySCIPOpt和SCIP?

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/67808711

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档