2017-03-27 100 views
0

我試圖做的教程https://github.com/dennybritz/rnn-tutorial-rnnlm。當我做了pip install -r requirements.txt我來到如下錯誤消息:錯誤,而PIP安裝-r requirements.txt

(venv) ~/PycharmProjects/rnn-tutorial-rnnlm $ pip install -r requirements.txt 
Collecting appnope==0.1.0 (from -r requirements.txt (line 1)) 
    Using cached appnope-0.1.0-py2.py3-none-any.whl 
Collecting backports.ssl-match-hostname==3.4.0.2 (from -r requirements.txt (line 2)) 
    Using cached backports.ssl_match_hostname-3.4.0.2.tar.gz 
Collecting certifi==2015.9.6.2 (from -r requirements.txt (line 3)) 
    Using cached certifi-2015.9.6.2-py2.py3-none-any.whl 
Collecting decorator==4.0.2 (from -r requirements.txt (line 4)) 
    Using cached decorator-4.0.2-py2.py3-none-any.whl 
Collecting funcsigs==0.4 (from -r requirements.txt (line 5)) 
    Using cached funcsigs-0.4-py2.py3-none-any.whl 
Collecting functools32==3.2.3.post2 (from -r requirements.txt (line 6)) 
    Using cached functools32-3.2.3-2.zip 
Collecting gnureadline==6.3.3 (from -r requirements.txt (line 7)) 
    Using cached gnureadline-6.3.3.tar.gz 
Collecting ipykernel==4.0.3 (from -r requirements.txt (line 8)) 
    Using cached ipykernel-4.0.3-py2.py3-none-any.whl 
Collecting ipython==4.0.0 (from -r requirements.txt (line 9)) 
    Using cached ipython-4.0.0-py2-none-any.whl 
Collecting ipython-genutils==0.1.0 (from -r requirements.txt (line 10)) 
    Using cached ipython_genutils-0.1.0-py2.py3-none-any.whl 
Collecting ipywidgets==4.0.2 (from -r requirements.txt (line 11)) 
    Using cached ipywidgets-4.0.2-py2.py3-none-any.whl 
Collecting Jinja2==2.8 (from -r requirements.txt (line 12)) 
    Using cached Jinja2-2.8-py2.py3-none-any.whl 
Collecting jsonschema==2.5.1 (from -r requirements.txt (line 13)) 
    Using cached jsonschema-2.5.1-py2.py3-none-any.whl 
Collecting jupyter==1.0.0 (from -r requirements.txt (line 14)) 
    Using cached jupyter-1.0.0-py2.py3-none-any.whl 
Collecting jupyter-client==4.0.0 (from -r requirements.txt (line 15)) 
    Using cached jupyter_client-4.0.0-py2.py3-none-any.whl 
Collecting jupyter-console==4.0.2 (from -r requirements.txt (line 16)) 
    Using cached jupyter_console-4.0.2-py2.py3-none-any.whl 
Collecting jupyter-core==4.0.6 (from -r requirements.txt (line 17)) 
    Using cached jupyter_core-4.0.6-py2.py3-none-any.whl 
Collecting MarkupSafe==0.23 (from -r requirements.txt (line 18)) 
    Using cached MarkupSafe-0.23.tar.gz 
Collecting matplotlib==1.4.3 (from -r requirements.txt (line 19)) 
    Using cached matplotlib-1.4.3.tar.gz 
    Complete output from command python setup.py egg_info: 
    ============================================================================ 
    Edit setup.cfg to change the build options 

    BUILDING MATPLOTLIB 
       matplotlib: yes [1.4.3] 
        python: yes [2.7.12 (default, Nov 19 2016, 06:48:10) [GCC 
          5.4.0 20160609]] 
        platform: yes [linux2] 

    REQUIRED DEPENDENCIES AND EXTENSIONS 
        numpy: yes [version 1.12.1] 
         six: yes [using six version 1.10.0] 
        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.] 
        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 [using pyparsing version 2.2.0] 
        pycxx: yes [Couldn't import. Using local copy.] 
        libagg: yes [pkg-config information for 'libagg' could not 
          be found. Using local copy.] 
        freetype: no [The C/C++ header for freetype2 (ft2build.h) 
          could not be found. You may need to install the 
          development package.] 
         png: no [The C/C++ header for libpng (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. pip/easy_install may attempt 
          to install it after matplotlib./mock is required 
          to run the matplotlib test suite. pip/easy_install 
          may attempt to install it after matplotlib.] 
      toolkits_tests: yes [nose 0.11.1 or later is required to run the 
          matplotlib test suite. pip/easy_install may attempt 
          to install it after matplotlib./mock is required 
          to run the matplotlib test suite. pip/easy_install 
          may attempt to install it after matplotlib.] 

    OPTIONAL BACKEND EXTENSIONS 
        macosx: no [Mac OS-X only] 
        qt5agg: no [PyQt5 not found] 
        qt4agg: no [PyQt4 not found] 
        pyside: no [PySide not found] 
        gtk3agg: no [Requires pygobject to be installed.] 
       gtk3cairo: no [Requires cairocffi or pycairo to be installed.] 
        gtkagg: no [Requires pygtk] 
        tkagg: no [TKAgg requires Tkinter.] 
        wxagg: no [requires wxPython] 
         gtk: no [Requires pygtk] 
         agg: yes [installing] 
        cairo: no [cairocffi or pycairo not found] 
       windowing: no [Microsoft Windows only] 

    OPTIONAL LATEX DEPENDENCIES 
        dvipng: no 
       ghostscript: yes [version 9.18] 
        latex: no 
        pdftops: yes [version 0.41.0] 

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

    ---------------------------------------- 
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-SBYScG/matplotlib/ 

爲什麼這些事情發生?任何幫助將非常感謝!先謝謝你!

+0

你的系統中是否安裝了'python-dev'軟件包? –

+0

您使用的是哪種Linux發行版和版本? –

回答

0
  freetype: no [The C/C++ header for freetype2 (ft2build.h) could not be found. You may need to install the development package.] 
      png: no [The C/C++ header for libpng (png.h) could not be found. You may need to install the development package.] 

這很清楚地指出,你必須安裝對FreeType2和libpng頭文件。