安装柠檬找不到 ILOG COIN SOPLEX

问题描述

我正在尝试安装 github repository 并按如下方式运行

/home/user/.local/bin/python3 -m pip install -e /home/user/repository_folder_name

我收到以下错误

    ERROR: Command errored out with exit status 1:
 command: /home/user/.local/bin/python3 -c 'import sys,setuptools,tokenize; sys.argv[0] = '"'"'/home/user/PyMatching/setup.py'"'"'; __file__='"'"'/home/user/PyMatching/setup.py'"'"';f=getattr(tokenize,'"'"'open'"'"',open)(__file__);code=f.read().replace('"'"'\r\n'"'"','"'"'\n'"'"');f.close();exec(compile(code,__file__,'"'"'exec'"'"'))' develop --no-deps
     cwd: /home/user/PyMatching/
Complete output (54 lines):
running develop
running egg_info
writing src/PyMatching.egg-info/PKG-INFO
writing dependency_links to src/PyMatching.egg-info/dependency_links.txt
writing requirements to src/PyMatching.egg-info/requires.txt
writing top-level names to src/PyMatching.egg-info/top_level.txt
reading manifest file 'src/PyMatching.egg-info/SOURCES.txt'
writing manifest file 'src/PyMatching.egg-info/SOURCES.txt'
running build_ext
-- pybind11 v2.4.dev4
CMake Warning (dev) at lib/lemon/CMakeLists.txt:6 (PROJECT):
  Policy CMP0048 is not set: project() command manages VERSION variables.
  Run "cmake --help-policy CMP0048" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.

  The following variable(s) would be set to empty:

    LEMON_VERSION
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Could NOT find ILOG (missing: ILOG_CPLEX_LIBRARY ILOG_CPLEX_INCLUDE_DIR)
-- Could NOT find COIN (missing: COIN_CBC_LIBRARY COIN_CBC_SOLVER_LIBRARY COIN_CGL_LIBRARY COIN_CLP_LIBRARY COIN_OSI_LIBRARY COIN_OSI_CBC_LIBRARY COIN_OSI_CLP_LIBRARY)
-- Could NOT find SOPLEX (missing: SOPLEX_LIBRARY SOPLEX_INCLUDE_DIR)
-- Configuring done
-- Generating done
-- Build files have been written to: /home/user/PyMatching
Error: Could not load cache

一个类似的问题 here。但我试过注释掉#CMAKE_POLICY(SET CMP0048 OLD) 并确保我使用的是最新版本的 cmake。

我不知道如何找到这些开发库或找到替代方案。请建议如何解决这个问题。此外,这仅在我尝试运行它的 unix 服务器上是一个问题。在我的本地 Windows 计算机上,安装进行得很顺利。

解决方法

我是 PyMatching 的开发者,现在我已将其添加到 Python 包索引(请参阅 here),以便您可以使用 pip 从 PyPI 安装最新版本:

pip install pymatching

由于 pip 将获取为各种平台构建的轮子,这有望解决您的问题,因为您不需要自己构建它。

如果您出于某种原因仍需要构建自己的 PyMatching 源代码的本地副本,只需克隆最新版本的 repo 也可能会解决您的问题,因为我已切换到更新版本自从您发布以来,Lemon C++ 库。

如果这不能解决问题,您也可以在 GitHub 上创建问题和/或让我知道您使用的是哪个版本的操作系统。