无法使用 Python 3.10.0 在 Windows 10 上安装 Taurus

Can't Install Taurus on Windows 10 with Python 3.10.0

无法使用 Python 3.10.0.

在 Windows 10 上安装 Taurus

已安装以下先决条件

我执行了 运行 这个命令并且成功了 python -m pip install --upgrade pip setuptools wheel

然后我执行了 运行 这个命令,它失败了,并收到下面的错误消息 python -m pip install bzt

Building wheels for collected packages: lxml
  Building wheel for lxml (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: 'C:\Python310\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Velu\AppData\Local\Temp\pip-install-x4tnp252\lxml_934044ed969e46eeb5efa36af2247526\setup.py'"'"'; __file__='"'"'C:\Users\Velu\AppData\Local\Temp\pip-install-x4tnp252\lxml_934044ed969e46eeb5efa36af2247526\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\Velu\AppData\Local\Temp\pip-wheel-jkg2tj3w'
       cwd: C:\Users\Velu\AppData\Local\Temp\pip-install-x4tnp252\lxml_934044ed969e46eeb5efa36af2247526\
  Complete output (94 lines):
  Building lxml version 4.6.3.
  Building without Cython.
  Building against pre-built libxml2 andl libxslt libraries
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build\lib.win-amd64-3.10
  creating build\lib.win-amd64-3.10\lxml
  copying src\lxml\builder.py -> build\lib.win-amd64-3.10\lxml
  copying src\lxml\cssselect.py -> build\lib.win-amd64-3.10\lxml
  copying src\lxml\doctestcompare.py -> build\lib.win-amd64-3.10\lxml
  copying src\lxml\ElementInclude.py -> build\lib.win-amd64-3.10\lxml
  copying src\lxml\pyclasslookup.py -> build\lib.win-amd64-3.10\lxml
  copying src\lxml\sax.py -> build\lib.win-amd64-3.10\lxml
  copying src\lxml\usedoctest.py -> build\lib.win-amd64-3.10\lxml
  copying src\lxml\_elementpath.py -> build\lib.win-amd64-3.10\lxml
  copying src\lxml\__init__.py -> build\lib.win-amd64-3.10\lxml
  creating build\lib.win-amd64-3.10\lxml\includes
  copying src\lxml\includes\__init__.py -> build\lib.win-amd64-3.10\lxml\includes
  creating build\lib.win-amd64-3.10\lxml\html
  copying src\lxml\html\builder.py -> build\lib.win-amd64-3.10\lxml\html
  copying src\lxml\html\clean.py -> build\lib.win-amd64-3.10\lxml\html
  copying src\lxml\html\defs.py -> build\lib.win-amd64-3.10\lxml\html
  copying src\lxml\html\diff.py -> build\lib.win-amd64-3.10\lxml\html
  copying src\lxml\html\ElementSoup.py -> build\lib.win-amd64-3.10\lxml\html
  copying src\lxml\html\formfill.py -> build\lib.win-amd64-3.10\lxml\html
  copying src\lxml\html\html5parser.py -> build\lib.win-amd64-3.10\lxml\html
  copying src\lxml\html\soupparser.py -> build\lib.win-amd64-3.10\lxml\html
  copying src\lxml\html\usedoctest.py -> build\lib.win-amd64-3.10\lxml\html
  copying src\lxml\html\_diffcommand.py -> build\lib.win-amd64-3.10\lxml\html
  copying src\lxml\html\_html5builder.py -> build\lib.win-amd64-3.10\lxml\html
  copying src\lxml\html\_setmixin.py -> build\lib.win-amd64-3.10\lxml\html
  copying src\lxml\html\__init__.py -> build\lib.win-amd64-3.10\lxml\html
  creating build\lib.win-amd64-3.10\lxml\isoschematron
  copying src\lxml\isoschematron\__init__.py -> build\lib.win-amd64-3.10\lxml\isoschematron
  copying src\lxml\etree.h -> build\lib.win-amd64-3.10\lxml
  copying src\lxml\etree_api.h -> build\lib.win-amd64-3.10\lxml
  copying src\lxml\lxml.etree.h -> build\lib.win-amd64-3.10\lxml
  copying src\lxml\lxml.etree_api.h -> build\lib.win-amd64-3.10\lxml
  copying src\lxml\includes\c14n.pxd -> build\lib.win-amd64-3.10\lxml\includes
  copying src\lxml\includes\config.pxd -> build\lib.win-amd64-3.10\lxml\includes
  copying src\lxml\includes\dtdvalid.pxd -> build\lib.win-amd64-3.10\lxml\includes
  copying src\lxml\includes\etreepublic.pxd -> build\lib.win-amd64-3.10\lxml\includes
  copying src\lxml\includes\htmlparser.pxd -> build\lib.win-amd64-3.10\lxml\includes
  copying src\lxml\includes\relaxng.pxd -> build\lib.win-amd64-3.10\lxml\includes
  copying src\lxml\includes\schematron.pxd -> build\lib.win-amd64-3.10\lxml\includes
  copying src\lxml\includes\tree.pxd -> build\lib.win-amd64-3.10\lxml\includes
  copying src\lxml\includes\uri.pxd -> build\lib.win-amd64-3.10\lxml\includes
  copying src\lxml\includes\xinclude.pxd -> build\lib.win-amd64-3.10\lxml\includes
  copying src\lxml\includes\xmlerror.pxd -> build\lib.win-amd64-3.10\lxml\includes
  copying src\lxml\includes\xmlparser.pxd -> build\lib.win-amd64-3.10\lxml\includes
  copying src\lxml\includes\xmlschema.pxd -> build\lib.win-amd64-3.10\lxml\includes
  copying src\lxml\includes\xpath.pxd -> build\lib.win-amd64-3.10\lxml\includes
  copying src\lxml\includes\xslt.pxd -> build\lib.win-amd64-3.10\lxml\includes
  copying src\lxml\includes\__init__.pxd -> build\lib.win-amd64-3.10\lxml\includes
  copying src\lxml\includes\etree_defs.h -> build\lib.win-amd64-3.10\lxml\includes
  copying src\lxml\includes\lxml-version.h -> build\lib.win-amd64-3.10\lxml\includes
  creating build\lib.win-amd64-3.10\lxml\isoschematron\resources
  creating build\lib.win-amd64-3.10\lxml\isoschematron\resources\rng
  copying src\lxml\isoschematron\resources\rng\iso-schematron.rng -> build\lib.win-amd64-3.10\lxml\isoschematron\resources\rng
  creating build\lib.win-amd64-3.10\lxml\isoschematron\resources\xsl
  copying src\lxml\isoschematron\resources\xsl\RNG2Schtrn.xsl -> build\lib.win-amd64-3.10\lxml\isoschematron\resources\xsl
  copying src\lxml\isoschematron\resources\xsl\XSD2Schtrn.xsl -> build\lib.win-amd64-3.10\lxml\isoschematron\resources\xsl
  creating build\lib.win-amd64-3.10\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
  copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_abstract_expand.xsl -> build\lib.win-amd64-3.10\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
  copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_dsdl_include.xsl -> build\lib.win-amd64-3.10\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
  copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_schematron_message.xsl -> build\lib.win-amd64-3.10\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
  copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_schematron_skeleton_for_xslt1.xsl -> build\lib.win-amd64-3.10\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
  copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_svrl_for_xslt1.xsl -> build\lib.win-amd64-3.10\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
  copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\readme.txt -> build\lib.win-amd64-3.10\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
  running build_ext
  building 'lxml.etree' extension
  creating build\temp.win-amd64-3.10
  creating build\temp.win-amd64-3.10\Release
  creating build\temp.win-amd64-3.10\Release\src
  creating build\temp.win-amd64-3.10\Release\src\lxml
  C:\Program Files (x86)\Microsoft Visual Studio19\Community\VC\Tools\MSVC.29.30133\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DCYTHON_CLINE_IN_TRACEBACK=0 -Isrc -Isrc\lxml\includes -IC:\Python310\include -IC:\Python310\Include -IC:\Program Files (x86)\Microsoft Visual Studio19\Community\VC\Tools\MSVC.29.30133\ATLMFC\include -IC:\Program Files (x86)\Microsoft Visual Studio19\Community\VC\Tools\MSVC.29.30133\include -IC:\Program Files (x86)\Windows Kits\NETFXSDK.8\include\um -IC:\Program Files (x86)\Windows Kits\include.0.19041.0\ucrt -IC:\Program Files (x86)\Windows Kits\include.0.19041.0\shared -IC:\Program Files (x86)\Windows Kits\include.0.19041.0\um -IC:\Program Files (x86)\Windows Kits\include.0.19041.0\winrt -IC:\Program Files (x86)\Windows Kits\include.0.19041.0\cppwinrt /Tcsrc\lxml\etree.c /Fobuild\temp.win-amd64-3.10\Release\src\lxml\etree.obj -w
  cl : Command line warning D9025 : overriding '/W3' with '/w'
  etree.c
  C:\Users\Velu\AppData\Local\Temp\pip-install-x4tnp252\lxml_934044ed969e46eeb5efa36af2247526\src\lxml\includes/etree_defs.h(14): fatal error C1083: Cannot open include file: 'libxml/xmlversion.h': No such file or directory
  Compile failed: command 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe' failed with exit code 2
  creating Users
  creating Users\Velu
  creating Users\Velu\AppData
  creating Users\Velu\AppData\Local
  creating Users\Velu\AppData\Local\Temp
  C:\Program Files (x86)\Microsoft Visual Studio19\Community\VC\Tools\MSVC.29.30133\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -I/usr/include/libxml2 -IC:\Program Files (x86)\Microsoft Visual Studio19\Community\VC\Tools\MSVC.29.30133\ATLMFC\include -IC:\Program Files (x86)\Microsoft Visual Studio19\Community\VC\Tools\MSVC.29.30133\include -IC:\Program Files (x86)\Windows Kits\NETFXSDK.8\include\um -IC:\Program Files (x86)\Windows Kits\include.0.19041.0\ucrt -IC:\Program Files (x86)\Windows Kits\include.0.19041.0\shared -IC:\Program Files (x86)\Windows Kits\include.0.19041.0\um -IC:\Program Files (x86)\Windows Kits\include.0.19041.0\winrt -IC:\Program Files (x86)\Windows Kits\include.0.19041.0\cppwinrt /TcC:\Users\Velu\AppData\Local\Temp\xmlXPathInitgikupn8o.c /FoUsers\Velu\AppData\Local\Temp\xmlXPathInitgikupn8o.obj
  xmlXPathInitgikupn8o.c
  C:\Users\Velu\AppData\Local\Temp\xmlXPathInitgikupn8o.c(1): fatal error C1083: Cannot open include file: 'libxml/xpath.h': No such file or directory
  error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe' failed with exit code 2
  *********************************************************************************
  Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed?
  *********************************************************************************
  ----------------------------------------
  ERROR: Failed building wheel for lxml
  Running setup.py clean for lxml
Failed to build lxml
Installing collected packages: lxml, hdrpy, fuzzyset2, Cython, cssselect, colorlog, astunparse, Appium-Python-Client, bzt
    Running setup.py install for lxml ... error
    ERROR: Command errored out with exit status 1:
     command: 'C:\Python310\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Velu\AppData\Local\Temp\pip-install-x4tnp252\lxml_934044ed969e46eeb5efa36af2247526\setup.py'"'"'; __file__='"'"'C:\Users\Velu\AppData\Local\Temp\pip-install-x4tnp252\lxml_934044ed969e46eeb5efa36af2247526\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Velu\AppData\Local\Temp\pip-record-1q5zbo4z\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Python310\Include\lxml'
         cwd: C:\Users\Velu\AppData\Local\Temp\pip-install-x4tnp252\lxml_934044ed969e46eeb5efa36af2247526\
    Complete output (91 lines):
    Building lxml version 4.6.3.
    Building without Cython.
    Building against pre-built libxml2 andl libxslt libraries
    running install
    C:\Python310\lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
      warnings.warn(
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-3.10
    creating build\lib.win-amd64-3.10\lxml
    copying src\lxml\builder.py -> build\lib.win-amd64-3.10\lxml
    copying src\lxml\cssselect.py -> build\lib.win-amd64-3.10\lxml
    copying src\lxml\doctestcompare.py -> build\lib.win-amd64-3.10\lxml
    copying src\lxml\ElementInclude.py -> build\lib.win-amd64-3.10\lxml
    copying src\lxml\pyclasslookup.py -> build\lib.win-amd64-3.10\lxml
    copying src\lxml\sax.py -> build\lib.win-amd64-3.10\lxml
    copying src\lxml\usedoctest.py -> build\lib.win-amd64-3.10\lxml
    copying src\lxml\_elementpath.py -> build\lib.win-amd64-3.10\lxml
    copying src\lxml\__init__.py -> build\lib.win-amd64-3.10\lxml
    creating build\lib.win-amd64-3.10\lxml\includes
    copying src\lxml\includes\__init__.py -> build\lib.win-amd64-3.10\lxml\includes
    creating build\lib.win-amd64-3.10\lxml\html
    copying src\lxml\html\builder.py -> build\lib.win-amd64-3.10\lxml\html
    copying src\lxml\html\clean.py -> build\lib.win-amd64-3.10\lxml\html
    copying src\lxml\html\defs.py -> build\lib.win-amd64-3.10\lxml\html
    copying src\lxml\html\diff.py -> build\lib.win-amd64-3.10\lxml\html
    copying src\lxml\html\ElementSoup.py -> build\lib.win-amd64-3.10\lxml\html
    copying src\lxml\html\formfill.py -> build\lib.win-amd64-3.10\lxml\html
    copying src\lxml\html\html5parser.py -> build\lib.win-amd64-3.10\lxml\html
    copying src\lxml\html\soupparser.py -> build\lib.win-amd64-3.10\lxml\html
    copying src\lxml\html\usedoctest.py -> build\lib.win-amd64-3.10\lxml\html
    copying src\lxml\html\_diffcommand.py -> build\lib.win-amd64-3.10\lxml\html
    copying src\lxml\html\_html5builder.py -> build\lib.win-amd64-3.10\lxml\html
    copying src\lxml\html\_setmixin.py -> build\lib.win-amd64-3.10\lxml\html
    copying src\lxml\html\__init__.py -> build\lib.win-amd64-3.10\lxml\html
    creating build\lib.win-amd64-3.10\lxml\isoschematron
    copying src\lxml\isoschematron\__init__.py -> build\lib.win-amd64-3.10\lxml\isoschematron
    copying src\lxml\etree.h -> build\lib.win-amd64-3.10\lxml
    copying src\lxml\etree_api.h -> build\lib.win-amd64-3.10\lxml
    copying src\lxml\lxml.etree.h -> build\lib.win-amd64-3.10\lxml
    copying src\lxml\lxml.etree_api.h -> build\lib.win-amd64-3.10\lxml
    copying src\lxml\includes\c14n.pxd -> build\lib.win-amd64-3.10\lxml\includes
    copying src\lxml\includes\config.pxd -> build\lib.win-amd64-3.10\lxml\includes
    copying src\lxml\includes\dtdvalid.pxd -> build\lib.win-amd64-3.10\lxml\includes
    copying src\lxml\includes\etreepublic.pxd -> build\lib.win-amd64-3.10\lxml\includes
    copying src\lxml\includes\htmlparser.pxd -> build\lib.win-amd64-3.10\lxml\includes
    copying src\lxml\includes\relaxng.pxd -> build\lib.win-amd64-3.10\lxml\includes
    copying src\lxml\includes\schematron.pxd -> build\lib.win-amd64-3.10\lxml\includes
    copying src\lxml\includes\tree.pxd -> build\lib.win-amd64-3.10\lxml\includes
    copying src\lxml\includes\uri.pxd -> build\lib.win-amd64-3.10\lxml\includes
    copying src\lxml\includes\xinclude.pxd -> build\lib.win-amd64-3.10\lxml\includes
    copying src\lxml\includes\xmlerror.pxd -> build\lib.win-amd64-3.10\lxml\includes
    copying src\lxml\includes\xmlparser.pxd -> build\lib.win-amd64-3.10\lxml\includes
    copying src\lxml\includes\xmlschema.pxd -> build\lib.win-amd64-3.10\lxml\includes
    copying src\lxml\includes\xpath.pxd -> build\lib.win-amd64-3.10\lxml\includes
    copying src\lxml\includes\xslt.pxd -> build\lib.win-amd64-3.10\lxml\includes
    copying src\lxml\includes\__init__.pxd -> build\lib.win-amd64-3.10\lxml\includes
    copying src\lxml\includes\etree_defs.h -> build\lib.win-amd64-3.10\lxml\includes
    copying src\lxml\includes\lxml-version.h -> build\lib.win-amd64-3.10\lxml\includes
    creating build\lib.win-amd64-3.10\lxml\isoschematron\resources
    creating build\lib.win-amd64-3.10\lxml\isoschematron\resources\rng
    copying src\lxml\isoschematron\resources\rng\iso-schematron.rng -> build\lib.win-amd64-3.10\lxml\isoschematron\resources\rng
    creating build\lib.win-amd64-3.10\lxml\isoschematron\resources\xsl
    copying src\lxml\isoschematron\resources\xsl\RNG2Schtrn.xsl -> build\lib.win-amd64-3.10\lxml\isoschematron\resources\xsl
    copying src\lxml\isoschematron\resources\xsl\XSD2Schtrn.xsl -> build\lib.win-amd64-3.10\lxml\isoschematron\resources\xsl
    creating build\lib.win-amd64-3.10\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
    copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_abstract_expand.xsl -> build\lib.win-amd64-3.10\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
    copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_dsdl_include.xsl -> build\lib.win-amd64-3.10\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
    copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_schematron_message.xsl -> build\lib.win-amd64-3.10\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
    copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_schematron_skeleton_for_xslt1.xsl -> build\lib.win-amd64-3.10\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
    copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_svrl_for_xslt1.xsl -> build\lib.win-amd64-3.10\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
    copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\readme.txt -> build\lib.win-amd64-3.10\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
    running build_ext
    building 'lxml.etree' extension
    creating build\temp.win-amd64-3.10
    creating build\temp.win-amd64-3.10\Release
    creating build\temp.win-amd64-3.10\Release\src
    creating build\temp.win-amd64-3.10\Release\src\lxml
    C:\Program Files (x86)\Microsoft Visual Studio19\Community\VC\Tools\MSVC.29.30133\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DCYTHON_CLINE_IN_TRACEBACK=0 -Isrc -Isrc\lxml\includes -IC:\Python310\include -IC:\Python310\Include -IC:\Program Files (x86)\Microsoft Visual Studio19\Community\VC\Tools\MSVC.29.30133\ATLMFC\include -IC:\Program Files (x86)\Microsoft Visual Studio19\Community\VC\Tools\MSVC.29.30133\include -IC:\Program Files (x86)\Windows Kits\NETFXSDK.8\include\um -IC:\Program Files (x86)\Windows Kits\include.0.19041.0\ucrt -IC:\Program Files (x86)\Windows Kits\include.0.19041.0\shared -IC:\Program Files (x86)\Windows Kits\include.0.19041.0\um -IC:\Program Files (x86)\Windows Kits\include.0.19041.0\winrt -IC:\Program Files (x86)\Windows Kits\include.0.19041.0\cppwinrt /Tcsrc\lxml\etree.c /Fobuild\temp.win-amd64-3.10\Release\src\lxml\etree.obj -w
    cl : Command line warning D9025 : overriding '/W3' with '/w'
    etree.c
    C:\Users\Velu\AppData\Local\Temp\pip-install-x4tnp252\lxml_934044ed969e46eeb5efa36af2247526\src\lxml\includes/etree_defs.h(14): fatal error C1083: Cannot open include file: 'libxml/xmlversion.h': No such file or directory
    Compile failed: command 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe' failed with exit code 2
    C:\Program Files (x86)\Microsoft Visual Studio19\Community\VC\Tools\MSVC.29.30133\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -I/usr/include/libxml2 -IC:\Program Files (x86)\Microsoft Visual Studio19\Community\VC\Tools\MSVC.29.30133\ATLMFC\include -IC:\Program Files (x86)\Microsoft Visual Studio19\Community\VC\Tools\MSVC.29.30133\include -IC:\Program Files (x86)\Windows Kits\NETFXSDK.8\include\um -IC:\Program Files (x86)\Windows Kits\include.0.19041.0\ucrt -IC:\Program Files (x86)\Windows Kits\include.0.19041.0\shared -IC:\Program Files (x86)\Windows Kits\include.0.19041.0\um -IC:\Program Files (x86)\Windows Kits\include.0.19041.0\winrt -IC:\Program Files (x86)\Windows Kits\include.0.19041.0\cppwinrt /TcC:\Users\Velu\AppData\Local\Temp\xmlXPathInitfo8vzh85.c /FoUsers\Velu\AppData\Local\Temp\xmlXPathInitfo8vzh85.obj
    xmlXPathInitfo8vzh85.c
    C:\Users\Velu\AppData\Local\Temp\xmlXPathInitfo8vzh85.c(1): fatal error C1083: Cannot open include file: 'libxml/xpath.h': No such file or directory
    error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe' failed with exit code 2
    *********************************************************************************
    Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed?
    *********************************************************************************
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Python310\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Velu\AppData\Local\Temp\pip-install-x4tnp252\lxml_934044ed969e46eeb5efa36af2247526\setup.py'"'"'; __file__='"'"'C:\Users\Velu\AppData\Local\Temp\pip-install-x4tnp252\lxml_934044ed969e46eeb5efa36af2247526\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Velu\AppData\Local\Temp\pip-record-1q5zbo4z\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Python310\Include\lxml' Check the logs for full command output.

也试过这个命令还是不行。 pip install lxml

我确实找到了其他一些 Whosebug 答案,但仍然没有成功。大多数答案都是旧版本。

有人遇到过这个问题吗?任何帮助将不胜感激。

c:\temp>pip install lxml-4.6.3-cp310-cp310-win_amd64.whl

成功了

重要的是,我们需要根据您的 python 版本选择正确的版本。

我的情况我安装了64位python3.10.0

从此处 http://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml 下载 lxml-4.6.3-cp310-cp310-win_amd64.whl 并将文件复制到 c:\temp,然后使用上述命令安装。

重要的是你需要为你的特定版本选择这个正确的文件 cp310 这里 310 参考你的 python 版本。