首页 > 解决方案 > python setup.py egg_info" 失败,错误代码 1 在 /tmp/pip-install-vdozlB/libvirt-python/

问题描述

Collecting libvirt-python==1.2.2 (from -r /requirements/requirements.txt (line 14))
  Downloading https://files.pythonhosted.org/packages/b9/51/ed3a8c5573f57229399c25ff0c0066e8d93c2e31d7315afc9675cf35f6b5/libvirt-python-1.2.2.tar.gz (146kB)
    Complete output from command python setup.py egg_info:
    Package libvirt was not found in the pkg-config search path.
    Perhaps you should add the directory containing `libvirt.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'libvirt' found
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-vdozlB/libvirt-python/setup.py", line 36, in <module>
        "libvirt"])
      File "/usr/local/lib/python2.7/distutils/spawn.py", line 38, in spawn
        _spawn_posix(cmd, search_path, dry_run=dry_run)
      File "/usr/local/lib/python2.7/distutils/spawn.py", line 192, in _spawn_posix
        (cmd, exit_status)
    distutils.errors.DistutilsExecError: command '/usr/bin/pkg-config' failed with exit status 1

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-vdozlB/libvirt-python/
ERROR: Service 'django' failed to build: The command '/bin/sh -c pip install -r /requirements/dev-requirements.txt' returned a non-zero code: 1

标签: python-2.7dockerdocker-compose

解决方案


No package 'libvirt' found
ERROR: Service 'django' failed to build: The command '/bin/sh -c pip install -r /requirements/dev-requirements.txt' returned a non-zero code: 1

libvirt 包在 Django 系统上不负责


推荐阅读