Als ich die Python-Bibliothek "pandasa_datareader" installierte, die die tatsächlichen Daten von US-Aktien erfasst, wurde der folgende Fehler ausgegeben.
python
root@2a1627805ea9:/home# pip3 install pandas_datareader
(Auf halbem Weg weggelassen)
src/lxml/includes/etree_defs.h:14:10: fatal error: libxml/xmlversion.h: No such file or directory
#include "libxml/xmlversion.h"
^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Compile failed: command 'arm-linux-gnueabihf-gcc' failed with exit status 1
cc -I/usr/include/libxml2 -c /tmp/xmlXPathInit_w7iprr1.c -o tmp/xmlXPathInit_w7iprr1.o
/tmp/xmlXPathInit_w7iprr1.c:2:1: warning: return type defaults to 'int' [-Wimplicit-int]
main (int argc, char **argv) {
^~~~
cc tmp/xmlXPathInit_w7iprr1.o -lxml2 -o a.out
error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1
----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-6l7hbylz/lxml/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-ex8h4yqx-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-6l7hbylz/lxml/
In file included from src/lxml/etree.c:692:0:
src/lxml/includes/etree_defs.h:14:10: fatal error: libxml/xmlversion.h: No such file or directory
#include "libxml/xmlversion.h"
^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Compile failed: command 'arm-linux-gnueabihf-gcc' failed with exit status 1
cc -I/usr/include/libxml2 -c /tmp/xmlXPathInitnltnxexy.c -o tmp/xmlXPathInitnltnxexy.o
/tmp/xmlXPathInitnltnxexy.c:1:10: fatal error: libxml/xpath.h: No such file or directory
#include "libxml/xpath.h"
^~~~~~~~~~~~~~~~
compilation terminated.
*********************************************************************************
Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed?
*********************************************************************************
error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1
Gegenmaßnahmen libxml2-dev Installieren Sie libxslt1-dev. Nach der Installation von libxml2-dev libxslt1-dev wurde pandas_datareader erfolgreich installiert.
python
root@2a1627805ea9:/home# apt-get install libxml2-dev libxslt1-dev
Recommended Posts