2016-08-21 11 views
8

विंडोज 7 पर पायथन 2.7 का उपयोग करते हुए यहाँ आदेश मैं स्थापित करने और त्रुटि संदेश के उपयोग कर रहा हूँ है। आश्चर्य है कि अगर किसी ने पहले इसी तरह के मुद्दों से मुलाकात की है? धन्यवाद।अजगर matplotlib freetype के लिए विंडोज 7 पर इस मुद्दे को स्थापित करने, png संकुल

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\ 

उत्तर

5

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

प्राप्त matplotlib स्थान ऊपर से। पायथन (2.x/3.x) और बिट (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 

आप बीच में किसी भी मुद्दे का सामना करते हैं, तो नीचे दिए गए लिंक का संदर्भ लें: https://stackoverflow.com/a/38618044/5334188

+0

धन्यवाद, और अनौपचारिक libs आधिकारिक लोगों की तुलना में बहुत अच्छा काम करता है। :) –

+1

उत्तर के रूप में अपने उत्तर को चिह्नित करें, धन्यवाद be_good_do_good। –

5

आप इसे देख सकते हैं png और freetype मॉड्यूल याद कर रहे हैं। आपको उन्हें अलग से स्थापित करने की आवश्यकता है।

निम्न कार्य कोशिश:

> pip install freetype-py 
> pip install pypng 
> pip install matplotlib 
+1

वोट दें धन्यवाद रयान, लेकिन आपकी विधि में अभी भी समस्याएं हैं। मैंने अनौपचारिक पैकेज को be_good_do_good से आजमाया, और बहुत अच्छा काम करता है। :) –

+0

हालांकि मैं frretype-py और pypng स्थापित कर सकते हैं, दुर्भाग्य से matplotlib बिल्कुल png और वास्तव में freetype पैकेज का नाम – Antonio

+0

की आवश्यकता के लिए आप भी 'matplotlib' संस्थापक के लिए' libpng-devel' और 'libfreetype-devel' संकुल स्थापित करने की आवश्यकता लगती है सफल होने के लिए - यह पैकेज नाम के साथ कोई समस्या नहीं है (इसे समझने में मुझे एक अच्छा घंटा लगा)। – zelanix

9

मैं इसे संस्करण 1.5.1

pip install matplotlib==1.5.1 

लेने ऐसा लगता है कि संस्करण 1.5.2 संस्थापक टूट गया है द्वारा हल किया।

+0

धन्यवाद एक और विकल्प से डोरन। :) –

2

मैं तुम्हारे साथ एक ही समस्या के पार आया, और यहां मेरे समाधान

यह नवीनतम पिप के साथ एकीकृत अजगर 3.6 के साथ समस्या है। इसलिए मैंने पाइप के साथ पाइथन 3.5.2 स्थापित किया, लेकिन पाइप को अपग्रेड न करें। और आप इस तरह से matplotlib स्थापित कर सकते हैं।

आशा है कि मैं एक संभावित समाधान प्रदान कर सकता हूं

+0

धन्यवाद मार्क, मेरी स्थिति है, मैं पाइथन 2.7 का उपयोग कर रहा हूं। –

4

मेरे पास एक ही समस्या थी।

लगता है कि मेरी पिप v7 जो पुराना है था। 'अपग्रेड' बटन के साथ v9 में अपग्रेड किया गया। फिर मैटलप्लिब को फिर से स्थापित करने का प्रयास किया और इस बार सफल रहा।

शायद यह

+0

यह मेरा मुद्दा भी था, मेरे जीवन को बचाया। धन्यवाद! – coolDude

संबंधित मुद्दे