0

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

/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

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

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

4

1 回答 1

0

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

pip install pymatching

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

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

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

于 2021-03-29T13:02:43.250 回答