包将不安装。在命令提示符中,我输入了'pip install yfinance‘
C:\Users\gam19\AppData\Local\Temp\xmlXPathInitw4g8q0z6.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\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.34.31933\\bin\\HostX86\\x86\\cl.exe' failed with exit code 2
*********************************************************************************
Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed?
*********************************************************************************
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> lxml
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.发布于 2022-12-03 22:49:26
您可以从https://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml下载车轮并安装它(例如,pip安装lxl-4.9.0-cp311-cp311-winamd64.whl)。在那之后,尝试“pip install yfinance”可能会奏效。
https://stackoverflow.com/questions/74549570
复制相似问题