编辑你的昵称 2021-10-20 00:01 采纳率: 100%
浏览 177
已结题

请问如何解决python无法安装requests-html模块的问题?

报错如下:
Running setup.py install for lxml ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\GCA\AppData\Local\Programs\Python\Python310\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\GCA\AppData\Local\Temp\pip-install-1my9q08b\lxml_2b0ae08f193247408edb583e6b597f93\setup.py'"'"'; file='"'"'C:\Users\GCA\AppData\Local\Temp\pip-install-1my9q08b\lxml_2b0ae08f193247408edb583e6b597f93\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\GCA\AppData\Local\Temp\pip-record-n4_scp1x\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\GCA\AppData\Local\Programs\Python\Python310\Include\lxml'
C:\Users\GCA\AppData\Local\Temp\pip-install-1my9q08b\lxml_2b0ae08f193247408edb583e6b597f93\src\lxml\includes/etree_defs.h(14): fatal error C1083: 无法打开包括文件: “libxml/xmlversion.h”: No such file or directory
Compile failed: command 'D:\buildtool\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe' failed with exit code 2
creating Users
creating Users\GCA
creating Users\GCA\AppData
creating Users\GCA\AppData\Local
creating Users\GCA\AppData\Local\Temp
D:\buildtool\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -I/usr/include/libxml2 -ID:\buildtool\VC\Tools\MSVC\14.29.30133\include -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt /TcC:\Users\GCA\AppData\Local\Temp\xmlXPathInitsz_njp7x.c /FoUsers\GCA\AppData\Local\Temp\xmlXPathInitsz_njp7x.obj
xmlXPathInitsz_njp7x.c
C:\Users\GCA\AppData\Local\Temp\xmlXPathInitsz_njp7x.c(1): fatal error C1083: 无法打开包括文件: “libxml/xpath.h”: No such file or directory
error: command 'D:\buildtool\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:\Users\GCA\AppData\Local\Programs\Python\Python310\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\GCA\AppData\Local\Temp\pip-install-1my9q08b\lxml_2b0ae08f193247408edb583e6b597f93\setup.py'"'"'; file='"'"'C:\Users\GCA\AppData\Local\Temp\pip-install-1my9q08b\lxml_2b0ae08f193247408edb583e6b597f93\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\GCA\AppData\Local\Temp\pip-record-n4_scp1x\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\GCA\AppData\Local\Programs\Python\Python310\Include\lxml' Check the logs for full command output.

C:\Users\GCA>

  • 写回答

1条回答 默认 最新

报告相同问题?

问题事件

  • 系统已结题 10月28日
  • 已采纳回答 10月20日
  • 创建了问题 10月20日

悬赏问题

  • ¥15 vs2022无法联网
  • ¥15 TCP的客户端和服务器的互联
  • ¥15 VB.NET操作免驱摄像头
  • ¥15 笔记本上移动热点开关状态查询
  • ¥85 类鸟群Boids——仿真鸟群避障的相关问题
  • ¥15 CFEDEM自带算例错误,如何解决?
  • ¥15 有没有会使用flac3d软件的家人
  • ¥20 360摄像头无法解绑使用,请教解绑当前账号绑定问题,
  • ¥15 docker实践项目
  • ¥15 利用pthon计算薄膜结构的光导纳