我正在努力成功地安装Pyconcorde,这是一种Python 包装器.我在Raspberry PI OS 64位和Ubuntu 23.04上得到了同样的错误.我对Linux还很陌生,所以我不确定如何解决这个错误.

https://github.com/jvkersch/pyconcorde

这是我在我的树莓PI 4B上安装了**Ubuntu 23.04**(Python3.11)后的终端

(venv) dan@dan-desktop:~/Documents/Scribble/pyconcorde$ pip install -e .
Obtaining file:///home/dan/Documents/Scribble/pyconcorde
  Installing build dependencies ... done
  Checking if build backend supports build_editable ... done
  Getting requirements to build editable ... done
  Installing backend dependencies ... done
  Preparing editable metadata (pyproject.toml) ... done
Collecting cython>=0.22.0
  Using cached Cython-3.0.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (3.4 MB)
Collecting numpy>=1.21.0
  Using cached numpy-1.25.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (14.2 MB)
Collecting tsplib95
  Downloading tsplib95-0.7.1-py2.py3-none-any.whl (25 kB)
Collecting Click>=6.0
  Downloading click-8.1.7-py3-none-any.whl (97 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 97.9/97.9 kB 2.1 MB/s eta 0:00:00
Collecting Deprecated~=1.2.9
  Downloading Deprecated-1.2.14-py2.py3-none-any.whl (9.6 kB)
Collecting networkx~=2.1
  Downloading networkx-2.8.8-py3-none-any.whl (2.0 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.0/2.0 MB 6.5 MB/s eta 0:00:00
Collecting tabulate~=0.8.7
  Downloading tabulate-0.8.10-py3-none-any.whl (29 kB)
Collecting wrapt<2,>=1.10
  Downloading wrapt-1.15.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (79 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 79.0/79.0 kB 2.5 MB/s eta 0:00:00
Building wheels for collected packages: pyconcorde
  Building editable for pyconcorde (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Building editable for pyconcorde (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [121 lines of output]
      running editable_wheel
      creating /tmp/pip-wheel-1tqulzi8/.tmp-nuwrk2or/pyconcorde.egg-info
      writing /tmp/pip-wheel-1tqulzi8/.tmp-nuwrk2or/pyconcorde.egg-info/PKG-INFO
      writing dependency_links to /tmp/pip-wheel-1tqulzi8/.tmp-nuwrk2or/pyconcorde.egg-info/dependency_links.txt
      writing requirements to /tmp/pip-wheel-1tqulzi8/.tmp-nuwrk2or/pyconcorde.egg-info/requires.txt
      writing top-level names to /tmp/pip-wheel-1tqulzi8/.tmp-nuwrk2or/pyconcorde.egg-info/top_level.txt
      writing manifest file '/tmp/pip-wheel-1tqulzi8/.tmp-nuwrk2or/pyconcorde.egg-info/SOURCES.txt'
      dependency /tmp/pip-build-env-850uyryb/overlay/lib/python3.11/site-packages/numpy/core/include/numpy/arrayobject.h won't be automatically included in the manifest: the path must be relative
      dependency /tmp/pip-build-env-850uyryb/overlay/lib/python3.11/site-packages/numpy/core/include/numpy/arrayscalars.h won't be automatically included in the manifest: the path must be relative
      dependency /tmp/pip-build-env-850uyryb/overlay/lib/python3.11/site-packages/numpy/core/include/numpy/ndarrayobject.h won't be automatically included in the manifest: the path must be relative
      dependency /tmp/pip-build-env-850uyryb/overlay/lib/python3.11/site-packages/numpy/core/include/numpy/ndarraytypes.h won't be automatically included in the manifest: the path must be relative
      dependency /tmp/pip-build-env-850uyryb/overlay/lib/python3.11/site-packages/numpy/core/include/numpy/ufuncobject.h won't be automatically included in the manifest: the path must be relative
      reading manifest file '/tmp/pip-wheel-1tqulzi8/.tmp-nuwrk2or/pyconcorde.egg-info/SOURCES.txt'
      reading manifest template 'MANIFEST.in'
      warning: no files found matching 'requirements.txt'
      adding license file 'COPYING'
      writing manifest file '/tmp/pip-wheel-1tqulzi8/.tmp-nuwrk2or/pyconcorde.egg-info/SOURCES.txt'
      creating '/tmp/pip-wheel-1tqulzi8/.tmp-nuwrk2or/pyconcorde-0.1.0.dist-info'
      creating /tmp/pip-wheel-1tqulzi8/.tmp-nuwrk2or/pyconcorde-0.1.0.dist-info/WHEEL
      running build_py
      running build_ext
      Traceback (most recent call last):
        File "/tmp/pip-build-env-850uyryb/overlay/lib/python3.11/site-packages/setuptools/command/editable_wheel.py", line 156, in run
          self._create_wheel_file(bdist_wheel)
        File "/tmp/pip-build-env-850uyryb/overlay/lib/python3.11/site-packages/setuptools/command/editable_wheel.py", line 345, in _create_wheel_file
          files, mapping = self._run_build_commands(dist_name, unpacked, lib, tmp)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-850uyryb/overlay/lib/python3.11/site-packages/setuptools/command/editable_wheel.py", line 268, in _run_build_commands
          self._run_build_subcommands()
        File "/tmp/pip-build-env-850uyryb/overlay/lib/python3.11/site-packages/setuptools/command/editable_wheel.py", line 295, in _run_build_subcommands
          self.run_command(name)
        File "/tmp/pip-build-env-850uyryb/overlay/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
          self.distribution.run_command(command)
        File "/tmp/pip-build-env-850uyryb/overlay/lib/python3.11/site-packages/setuptools/dist.py", line 1233, in run_command
          super().run_command(command)
        File "/tmp/pip-build-env-850uyryb/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "<string>", line 119, in run
        File "<string>", line 76, in download_concorde_qsopt
      KeyError: 'aarch64'
      /tmp/pip-build-env-850uyryb/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py:988: _DebuggingTips: Problem in editable installation.
      !!
      
              ********************************************************************************
              An error happened while installing `pyconcorde` in editable mode.
      
              The following steps are recommended to help debug this problem:
      
              - Try to install the project normally, without using the editable mode.
                Does the error still persist?
                (If it does, try fixing the problem before attempting the editable mode).
              - If you are using binary extensions, make sure you have all OS-level
                dependencies installed (e.g. compilers, toolchains, binary libraries, ...).
              - Try the latest version of setuptools (maybe the error was already fixed).
              - If you (or your project dependencies) are using any setuptools extension
                or customization, make sure they support the editable mode.
      
              After following the steps above, if the problem still persists and
              you think this is related to how setuptools handles editable installations,
              please submit a reproducible example
              (see https://stackoverflow.com/help/minimal-reproducible-example) to:
      
                  https://github.com/pypa/setuptools/issues
      
              See https://setuptools.pypa.io/en/latest/userguide/development_mode.html for details.
              ********************************************************************************
      
      !!
        cmd_obj.run()
      qsopt is missing, downloading
      Traceback (most recent call last):
        File "/home/dan/Documents/Scribble/venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/home/dan/Documents/Scribble/venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/home/dan/Documents/Scribble/venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 273, in build_editable
          return hook(wheel_directory, config_settings, metadata_directory)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-850uyryb/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 463, in build_editable
          return self._build_with_temp_dir(
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-850uyryb/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 419, in _build_with_temp_dir
          self.run_setup()
        File "/tmp/pip-build-env-850uyryb/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 507, in run_setup
          super(_BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script)
        File "/tmp/pip-build-env-850uyryb/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 341, in run_setup
          exec(code, locals())
        File "<string>", line 146, in <module>
        File "/tmp/pip-build-env-850uyryb/overlay/lib/python3.11/site-packages/setuptools/__init__.py", line 107, in setup
          return distutils.core.setup(**attrs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-850uyryb/overlay/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 185, in setup
          return run_commands(dist)
                 ^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-850uyryb/overlay/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
          dist.run_commands()
        File "/tmp/pip-build-env-850uyryb/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
          self.run_command(cmd)
        File "/tmp/pip-build-env-850uyryb/overlay/lib/python3.11/site-packages/setuptools/dist.py", line 1233, in run_command
          super().run_command(command)
        File "/tmp/pip-build-env-850uyryb/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/tmp/pip-build-env-850uyryb/overlay/lib/python3.11/site-packages/setuptools/command/editable_wheel.py", line 156, in run
          self._create_wheel_file(bdist_wheel)
        File "/tmp/pip-build-env-850uyryb/overlay/lib/python3.11/site-packages/setuptools/command/editable_wheel.py", line 345, in _create_wheel_file
          files, mapping = self._run_build_commands(dist_name, unpacked, lib, tmp)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-850uyryb/overlay/lib/python3.11/site-packages/setuptools/command/editable_wheel.py", line 268, in _run_build_commands
          self._run_build_subcommands()
        File "/tmp/pip-build-env-850uyryb/overlay/lib/python3.11/site-packages/setuptools/command/editable_wheel.py", line 295, in _run_build_subcommands
          self.run_command(name)
        File "/tmp/pip-build-env-850uyryb/overlay/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
          self.distribution.run_command(command)
        File "/tmp/pip-build-env-850uyryb/overlay/lib/python3.11/site-packages/setuptools/dist.py", line 1233, in run_command
          super().run_command(command)
        File "/tmp/pip-build-env-850uyryb/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "<string>", line 119, in run
        File "<string>", line 76, in download_concorde_qsopt
      KeyError: 'aarch64'
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building editable for pyconcorde
Failed to build pyconcorde
ERROR: Could not build wheels for pyconcorde, which is required to install pyproject.toml-based projects

我也试着下载了基于原始网站方向的协和式飞机,但没有任何成功.https://www.math.uwaterloo.ca/tsp/concorde/DOC/index.html

我也曾在64位的Raspberry pi 0S上try 过降级到python3.8,但也出现了同样的错误.我想知道来自python包装器的setup.py文件是不是过时了,或者与我 Select 的操作系统不兼容?

如有任何故障排除建议,我们将不胜感激.

推荐答案

以下是setup.py (from the most recent commit)个受支持平台的列表.该项目在arm64和x64处理器上支持MacOS X,但只在x64处理器上支持Linux.没有针对Linux的arm64,根本没有aarch64.

Python-3.x相关问答推荐

Pandas—在特定列上比较两行双框,并根据特定条件保留其中一行?

Python GUI:tkinter应用程序作为Windows的实时桌面

如何使用python将pdf文件的页面合并为单个垂直组合页面

三重奏:为什么频道被记录为使用async with,而不是with?

按字母顺序排序列表 (OrderFilter),条件是值为 '' 的条目位于列表 DRF 的末尾

转换Pandas 数据框 - 添加行

当参数名称与 typing.Protocol 中定义的名称不同时发生 mypy 错误

SqlAlchemy - 从 oracle db 中检索长文本

Pandas数据单调行为

具有函数值的 Python 3 枚举

参数化泛型不能与类或实例判断一起使用

Pytorch 的随机 Select ?

smtplib 在 Python 3.1 中发送带有 unicode 字符的邮件的问题

简单的 get/post 请求在 python 3 中被阻止,但在 python 2 中没有

在 Python 3 中获取所有超类

在 Alembic 迁移期间更新列内容

try 在 Mac OS 中运行此命令pipenv install requests时出错

在 Keras 中训练神经网络的零精度

如何使用异步 for 循环遍历列表?

TypeError:无法将系列转换为