繁体   English   中英

libvirt-python在Mac上安装错误

[英]libvirt-python install on mac error

当我尝试通过以下方法安装libvirt-python时:

 pip install libvirt-python

我收到以下错误:

Collecting libvirt-python
  Downloading libvirt-python-2.5.0.tar.gz (172kB)
    100% |████████████████████████████████| 174kB 2.4MB/s
Building wheels for collected packages: libvirt-python
  Running setup.py bdist_wheel for libvirt-python ... error
  Complete output from command /usr/local/opt/python/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/private/var/folders/h4/8vv21pzx2k9471lzymg_r3th0000gp/T/pip-build-JcUj3e/libvirt-python/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /var/folders/h4/8vv21pzx2k9471lzymg_r3th0000gp/T/tmp79QS6spip-wheel- --python-tag cp27:
  running bdist_wheel
  running build
  /usr/local/bin/pkg-config --print-errors --atleast-version=0.9.11 libvirt
  /usr/local/opt/python/bin/python2.7 generator.py libvirt /usr/local/Cellar/libvirt/3.0.0/share/libvirt/api/libvirt-api.xml
  Found 418 functions in /usr/local/Cellar/libvirt/3.0.0/share/libvirt/api/libvirt-api.xml
  Found 0 functions in libvirt-override-api.xml
  Generated 344 wrapper functions
  Missing type converters:
  virConnectSecretEventGenericCallback:1
  virStorageVolInfoPtr:1
  ERROR: failed virConnectSecretEventRegisterAny
  ERROR: failed virStorageVolGetInfoFlags
  error: command '/usr/local/opt/python/bin/python2.7' failed with exit status 1

  ----------------------------------------
  Failed building wheel for libvirt-python
  Running setup.py clean for libvirt-python
Failed to build libvirt-python
Installing collected packages: libvirt-python
  Running setup.py install for libvirt-python ... error
    Complete output from command /usr/local/opt/python/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/private/var/folders/h4/8vv21pzx2k9471lzymg_r3th0000gp/T/pip-build-JcUj3e/libvirt-python/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/h4/8vv21pzx2k9471lzymg_r3th0000gp/T/pip-eNRl_m-record/install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    /usr/local/bin/pkg-config --print-errors --atleast-version=0.9.11 libvirt
    /usr/local/opt/python/bin/python2.7 generator.py libvirt /usr/local/Cellar/libvirt/3.0.0/share/libvirt/api/libvirt-api.xml
    Found 418 functions in /usr/local/Cellar/libvirt/3.0.0/share/libvirt/api/libvirt-api.xml
    Found 0 functions in libvirt-override-api.xml
    Generated 344 wrapper functions
    Missing type converters:
    virConnectSecretEventGenericCallback:1
    virStorageVolInfoPtr:1
    ERROR: failed virConnectSecretEventRegisterAny
    ERROR: failed virStorageVolGetInfoFlags
    error: command '/usr/local/opt/python/bin/python2.7' failed with exit status 1

    ----------------------------------------
Command "/usr/local/opt/python/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/private/var/folders/h4/8vv21pzx2k9471lzymg_r3th0000gp/T/pip-build-JcUj3e/libvirt-python/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/h4/8vv21pzx2k9471lzymg_r3th0000gp/T/pip-eNRl_m-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/h4/8vv21pzx2k9471lzymg_r3th0000gp/T/pip-build-JcUj3e/libvirt-python/

任何帮助将不胜感激,因为我对如何解决此问题没有任何想法。

通过brew安装的Mac 10.11.4 Python 2.7.13和2.7.10 libvirt

Warning: libvirt-3.0.0 already installed

您需要安装libvirt-python 3.0.0,但PyPI上的仍然是2.5.0。 改为运行以下命令:

pip install https://libvirt.org/sources/python/libvirt-python-3.0.0.tar.gz

参考:

我们忘记了将3.0.0版本上传到PyPI。 现在,此错误已得到解决,因此,如果重试,它应该正确构建。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM