Lorsque j'ai installé la bibliothèque Python "pandasa_datareader" qui acquiert les données réelles des actions américaines, l'erreur suivante a été générée.
python
root@2a1627805ea9:/home# pip3 install pandas_datareader
(Omis à mi-chemin)
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
Contre-mesures libxml2-dev Installez libxslt1-dev. Après avoir installé libxml2-dev libxslt1-dev, pandas_datareader a été installé avec succès.
python
root@2a1627805ea9:/home# apt-get install libxml2-dev libxslt1-dev
Recommended Posts