Search code examples
python-3.xlinuxpipbuildraspberry-pi

Error: Could not build wheels for pyconcorde, which is which is required to install pyproject.toml-based projects


I am struggling to successfully install Pyconcorde,a python wrapper. I am getting the same error on Raspberry Pi OS 64 bit and on Ubuntu 23.04. I am pretty new to Linux so I am not sure how to address this error.

https://github.com/jvkersch/pyconcorde

Here is my terminal just after installing **Ubuntu 23.04 on my Raspberry Pi 4B ** (Python 3.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

I have tried downloading Concorde based on the original websites directions as well and have not had any success. https://www.math.uwaterloo.ca/tsp/concorde/DOC/index.html

I also tried downgrading to python 3.8 on an earlier attempt on Raspberry pi 0S 64 Bit and had the same error. I am wondering if the setup.py file from the python wrapper is out of date or incompatible with the operating systems I have chosen?

Any advice for troubleshooting is appreciated.


Solution

  • This is the list of supported platforms from setup.py (from the most recent commit). The project supports MacOS X on arm64 and x64 processors, but Linux only on x64. No arm64 for Linux, no aarch64 at all.