Erreur lors de l'installation de pandas_datareader

1. À propos de cet article

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

Erreur lors de l'installation de pandas_datareader
Erreur Polyfit lors de l'installation de matplotlib
Résolution des erreurs lors de l'installation de numba sur macOS
Installer Python 3.4.3.
Erreur Homebrew
Erreur lors de l'installation d'un module avec Python pip
Résumé des méthodes de gestion des erreurs lors de l'installation de TensorFlow (2)