it-swarm.it

Problema di installazione di python matplotlib su Windows 7 per pacchetti freerype, png

Utilizzo di Python 2.7 su Windows 7. Ecco il comando che sto usando per installare e il messaggio di errore. Ti chiedi se qualcuno ha già riscontrato problemi simili prima? Grazie.

C:\Python27\Scripts>pip install matplotlib
Collecting matplotlib
  Downloading matplotlib-1.5.2.tar.gz (51.6MB)
    100% |################################| 51.6MB 19kB/s
    Complete output from command python setup.py Egg_info:
    ============================================================================

    Edit setup.cfg to change the build options

    BUILDING MATPLOTLIB
                matplotlib: yes [1.5.2]
                    python: yes [2.7.11 (v2.7.11:6d1b6a68f775, Dec  5 2015,
                            20:40:30) [MSC v.1500 64 bit (AMD64)]]
                  platform: yes [win32]

    REQUIRED DEPENDENCIES AND EXTENSIONS
                     numpy: yes [version 1.11.1]
                  dateutil: yes [dateutil was not found. It is required for date

                            axis support. pip/easy_install may attempt to
                            install it after matplotlib.]
                      pytz: yes [pytz was not found. pip will attempt to install

                            it after matplotlib.]
                    cycler: yes [cycler was not found. pip will attempt to
                            install it after matplotlib.]
                   tornado: yes [tornado was not found. It is required for the
                            WebAgg backend. pip/easy_install may attempt to
                            install it after matplotlib.]
                 pyparsing: yes [pyparsing was not found. It is required for
                            mathtext support. pip/easy_install may attempt to
                            install it after matplotlib.]
                    libagg: yes [pkg-config information for 'libagg' could not
                            be found. Using local copy.]
                  freetype: no  [The C/C++ header for freetype (ft2build.h)
                            could not be found.  You may need to install the
                            development package.]
                       png: no  [The C/C++ header for png (png.h) could not be
                            found.  You may need to install the development
                            package.]
                     qhull: yes [pkg-config information for 'qhull' could not be

                            found. Using local copy.]

    OPTIONAL SUBPACKAGES
               sample_data: yes [installing]
                  toolkits: yes [installing]
                     tests: yes [nose 0.11.1 or later is required to run the
                            matplotlib test suite. Please install it with pip or

                            your preferred tool to run the test suite / mock is
                            required to run the matplotlib test suite. Please
                            install it with pip or your preferred tool to run
                            the test suite]
            toolkits_tests: yes [nose 0.11.1 or later is required to run the
                            matplotlib test suite. Please install it with pip or

                            your preferred tool to run the test suite / mock is
                            required to run the matplotlib test suite. Please
                            install it with pip or your preferred tool to run
                            the test suite]

    OPTIONAL BACKEND EXTENSIONS
                    macosx: no  [Mac OS-X only]
                    qt5agg: no  [PyQt5 not found]
                    qt4agg: no  [PySide not found; PyQt4 not found]
                   gtk3agg: no  [Requires pygobject to be installed.]
                 gtk3cairo: no  [Requires cairocffi or pycairo to be installed.]

                    gtkagg: no  [Requires pygtk]
                     tkagg: yes [installing; run-time loading from Python Tcl /
                            Tk]
                     wxagg: no  [requires wxPython]
                       gtk: no  [Requires pygtk]
                       agg: yes [installing]
                     cairo: no  [cairocffi or pycairo not found]
                 windowing: yes [installing]

    OPTIONAL LATEX DEPENDENCIES
                    dvipng: no
               ghostscript: no
                     latex: no
                   pdftops: no

    OPTIONAL PACKAGE DATA
                      dlls: no  [skipping due to configuration]

    ============================================================================

                            * The following required packages can not be built:
                            * freetype, png

    ----------------------------------------
Command "python setup.py Egg_info" failed with error code 1 in c:\users\foo\a
ppdata\local\temp\pip-build-zxfsow\matplotlib\
15
Lin Ma

http://www.lfd.uci.edu/~gohlke/pythonlibs/

Ottieni matplotlib dalla posizione sopra. Scegli il pacchetto corretto in base alla versione python (2.x/3.x) e bit (32/64).

32-bit 2.7: matplotlib-1.5.2-cp27-cp27m-win32.whl
64-bit 2.7: matplotlib-1.5.2-cp27-cp27m-win_AMD64.whl

Se si riscontrano problemi nel mezzo, fare riferimento al seguente link: https://stackoverflow.com/a/38618044/5334188

6
be_good_do_good

L'ho risolto prendendo la versione 1.5.1

pip install matplotlib==1.5.1

sembra che l'installer della versione 1.5.2 sia rotto.

11
Doron Gombosh

Come puoi vedere, mancano i moduli png e freetype. È necessario installarli separatamente.

Prova a fare quanto segue:

> pip install freetype-py
> pip install pypng
> pip install matplotlib
9
Ryan B.

Ho avuto lo stesso identico problema.

Sembra che il mio pip fosse v7 che è vecchio. aggiornato alla v9 con il pulsante "upgrade" . quindi ho provato ad installare nuovamente matplotlib e questa volta ha avuto successo.

forse questo aiuta

4
E.Mich

Ho incontrato lo stesso problema con te, ed ecco la mia soluzione

Ha il problema con python 3.6 integrato con il più recente pip . Quindi ho installato python 3.5.2 con pip, ma non aggiornare pip . E puoi ottenere matplotlib installato in questo modo.

Spero di poter fornire una possibile soluzione

2
Mark

Ho risolto lo stesso problema in Wİndows 10 come seguito:

1- Scarica i seguenti file per win32 o win64 python3.7: 

matplotlib-2.2.2-cp27-cp37m-win32.whl

o

matplotlib-2.2.2-cp27-cp37m-win_AMD64.whl

dal https://www.lfd.uci.edu/~gohlke/pythonlibs/

2- Dalla console cmd eseguire il file scaricato sotto python:

.\Downloads> python -m pip install matplotlib-2.2.2-cp37-cp37m-win_AMD64.whl

puoi provare il matplolib 

0