我正试图使用命令在我的Windows 10 64位计算机上安装ovirt python sdk
pip install ovirt-engine-sdk-python
我得到了以下错误
Collecting ovirt-engine-sdk-python
Using cached ovirt-engine-sdk-python-4.4.10.tar.gz (333 kB)
Requirement already satisfied: pycurl>=7.19.0 in c:python37libsite-packages (from ovirt-engine-sdk-python) (7.43.0.5)
Requirement already satisfied: six in c:python37libsite-packages (from ovirt-engine-sdk-python) (1.15.0)
Using legacy 'setup.py install' for ovirt-engine-sdk-python, since package 'wheel' is not installed.
Installing collected packages: ovirt-engine-sdk-python
Running setup.py install for ovirt-engine-sdk-python ... error
ERROR: Command errored out with exit status 1:
command: 'c:python37python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\ADMINI~1\AppData\Local\Temp\pip-install-5bmup8ae\ovirt-engine-sdk-python_e4aa3cc952084095b14b9ec184319630\setup.py'"'"'; __file__='"'"'C:\Users\ADMINI~1\AppData\Local\Temp\pip-install-5bmup8ae\ovirt-engine-sdk-python_e4aa3cc952084095b14b9ec184319630\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:UsersADMINI~1AppDataLocalTemppip-record-2ivjrddyinstall-record.txt' --single-version-externally-managed --compile --install-headers 'c:python37Includeovirt-engine-sdk-python'
cwd: C:UsersADMINI~1AppDataLocalTemppip-install-5bmup8aeovirt-engine-sdk-python_e4aa3cc952084095b14b9ec184319630
Complete output (28 lines):
4.4.10
running install
running build
running build_py
creating build
creating buildlib.win-amd64-3.7
creating buildlib.win-amd64-3.7ovirtsdk4
copying libovirtsdk4http.py -> buildlib.win-amd64-3.7ovirtsdk4
copying libovirtsdk4reader.py -> buildlib.win-amd64-3.7ovirtsdk4
copying libovirtsdk4readers.py -> buildlib.win-amd64-3.7ovirtsdk4
copying libovirtsdk4service.py -> buildlib.win-amd64-3.7ovirtsdk4
copying libovirtsdk4services.py -> buildlib.win-amd64-3.7ovirtsdk4
copying libovirtsdk4types.py -> buildlib.win-amd64-3.7ovirtsdk4
copying libovirtsdk4version.py -> buildlib.win-amd64-3.7ovirtsdk4
copying libovirtsdk4writer.py -> buildlib.win-amd64-3.7ovirtsdk4
copying libovirtsdk4writers.py -> buildlib.win-amd64-3.7ovirtsdk4
copying libovirtsdk4__init__.py -> buildlib.win-amd64-3.7ovirtsdk4
running build_ext
building 'ovirtsdk4.xml' extension
creating buildtemp.win-amd64-3.7
creating buildtemp.win-amd64-3.7Release
creating buildtemp.win-amd64-3.7Releaseext
C:Program Files (x86)Microsoft Visual Studio2019BuildToolsVCToolsMSVC14.28.29910binHostX86x64cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -I/usr/include/libxml2 -Ic:python37include -Ic:python37include "-IC:Program Files (x86)Microsoft Visual Studio2019BuildToolsVCToolsMSVC14.28.29910include" "-IC:Program Files (x86)Windows KitsNETFXSDK4.6.1includeum" "-IC:Program Files (x86)Windows Kits10include10.0.19041.0ucrt" "-IC:Program Files (x86)Windows Kits10include10.0.19041.0shared" "-IC:Program Files (x86)Windows Kits10include10.0.19041.0um" "-IC:Program Files (x86)Windows Kits10include10.0.19041.0winrt" "-IC:Program Files (x86)Windows Kits10include10.0.19041.0cppwinrt" /Tcextov_xml_module.c /Fobuildtemp.win-amd64-3.7Releaseextov_xml_module.obj
ov_xml_module.c
C:Program Files (x86)Microsoft Visual Studio2019BuildToolsVCToolsMSVC14.28.29910binHostX86x64cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -I/usr/include/libxml2 -Ic:python37include -Ic:python37include "-IC:Program Files (x86)Microsoft Visual Studio2019BuildToolsVCToolsMSVC14.28.29910include" "-IC:Program Files (x86)Windows KitsNETFXSDK4.6.1includeum" "-IC:Program Files (x86)Windows Kits10include10.0.19041.0ucrt" "-IC:Program Files (x86)Windows Kits10include10.0.19041.0shared" "-IC:Program Files (x86)Windows Kits10include10.0.19041.0um" "-IC:Program Files (x86)Windows Kits10include10.0.19041.0winrt" "-IC:Program Files (x86)Windows Kits10include10.0.19041.0cppwinrt" /Tcextov_xml_reader.c /Fobuildtemp.win-amd64-3.7Releaseextov_xml_reader.obj
ov_xml_reader.c
extov_xml_reader.c(20): fatal error C1083: Cannot open include file: 'libxml/xmlreader.h': No such file or directory
error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29910\bin\HostX86\x64\cl.exe' failed with exit status 2
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:python37python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\ADMINI~1\AppData\Local\Temp\pip-install-5bmup8ae\ovirt-engine-sdk-python_e4aa3cc952084095b14b9ec184319630\setup.py'"'"'; __file__='"'"'C:\Users\ADMINI~1\AppData\Local\Temp\pip-install-5bmup8ae\ovirt-engine-sdk-python_e4aa3cc952084095b14b9ec184319630\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:UsersADMINI~1AppDataLocalTemppip-record-2ivjrddyinstall-record.txt' --single-version-externally-managed --compile --install-headers 'c:python37Includeovirt-engine-sdk-python' Check the logs for full command output.
我已经使用MS Visual Studio安装了最新的c++构建工具,我也已经下载了最新libxml包,但仍然无法安装ovirt包。
pip install lxml
Requirement already satisfied: lxml in c:python37libsite-packages (4.6.3)
我这里有什么东西不见了吗?
来自README.adoc
:
SDK使用libxml2来解析和呈现XML。SDK中与该库交互的部分是用C编写的。这意味着在构建之前,必须确保在系统中安装了C编译器以及所需的头文件和库文件。例如,如果您正在使用Fedora或CentOS:等发行版
dnf-y安装gcc libxml2-devel python3-devel
如果您使用的是Debian或Ubuntu:等发行版
apt-get——假设是安装gcc libxml2 dev python3 dev
对于w32,请尝试以下操作之一:http://xmlsoft.org/sources/win32/(位于http://xmlsoft.org/downloads.html)。