Skip to content

Installation Issue - "Could not build wheels for sysrepo, libyang" #17

Closed
@nullromo

Description

@nullromo

Problem

I am unable to install sysrepo using pip.

Details

I got the following error when trying to pip install sysrepo:

Expand to see error message
$ pip install sysrepo
Defaulting to user installation because normal site-packages is not writeable
Collecting sysrepo
  Using cached sysrepo-0.5.0.tar.gz (30 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
    Preparing wheel metadata ... done
Requirement already satisfied: cffi in /home/kkovacs/.local/lib/python3.9/site-packages (from sysrepo) (1.14.6)
Collecting libyang<2,>=1.7.0
  Using cached libyang-1.7.0.tar.gz (37 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
    Preparing wheel metadata ... done
Requirement already satisfied: pycparser in /home/kkovacs/.local/lib/python3.9/site-packages (from cffi->sysrepo) (2.20)
Building wheels for collected packages: sysrepo, libyang
  Building wheel for sysrepo (PEP 517) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python3 /home/kkovacs/.local/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py build_wheel /tmp/tmpp_u0s34g
       cwd: /tmp/pip-install-5udv2cn6/sysrepo_9c1f827729994319bef3993beaf47ca3



... hundreds of lines of GCC errors from sysrepo ...



error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
  ----------------------------------------
  ERROR: Failed building wheel for sysrepo
  Building wheel for libyang (PEP 517) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python3 /home/kkovacs/.local/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py build_wheel /tmp/tmpan_2g57n
       cwd: /tmp/pip-install-5udv2cn6/libyang_0d5f6a14eebe4ffb97ce6e86037c944a



... thousands of lines of GCC errors from libyang ...



 error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
  ----------------------------------------
  ERROR: Failed building wheel for libyang
Failed to build sysrepo libyang
ERROR: Could not build wheels for sysrepo, libyang which use PEP 517 and cannot be installed directly

I get a similar error from running pip install libyang.

Status

I have tried:

  • pip install --upgrade pip setuptools wheel
  • sudo apt-get install python3-dev
  • sudo apt-get install python3.9-dev
  • sudo apt-get install gcc python3-cffi

libyang is installed from source, and sysrepo already works fine on its own without the python bindings.

System Information

pip --version: pip 21.2.4 from /home/kkovacs/.local/lib/python3.9/site-packages/pip (python 3.9)
python --version: Python 3.9.5
OS: Ubuntu 20.04.3 LTS on WSL2 on Windows 10

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions