2015-11-02 188 views
-1

ggplot的安装失败,出现以下的输出:安装在Ubuntu上失败14.04

[email protected]:~$ sudo pip install -U ggplot 
Downloading/unpacking ggplot 
    Downloading ggplot-0.6.8.tar.gz (8.5MB): 8.5MB downloaded 
    Running setup.py (path:/tmp/pip_build_root/ggplot/setup.py) egg_info for package ggplot 

Downloading/unpacking six from https://pypi.python.org/packages/py2.py3/s/six/six-1.10.0-py2.py3-none-any.whl#md5=3ab558cf5d4f7a72611d59a81a315dc8 (from ggplot) 
    Downloading six-1.10.0-py2.py3-none-any.whl 
Downloading/unpacking statsmodels (from ggplot) 
    Downloading statsmodels-0.6.1.tar.gz (7.0MB): 7.0MB downloaded 
    Running setup.py (path:/tmp/pip_build_root/statsmodels/setup.py) egg_info for package statsmodels 

    package init file 'statsmodels/tsa/vector_ar/data/__init__.py' not found (or not a regular file) 
    warning: no files found matching '*.pxi' anywhere in distribution 
    warning: no previously-included files matching '*' found under directory 'build' 
    warning: no previously-included files matching '*' found under directory 'dist' 
    warning: no previously-included files found matching 'docs/source/generated/*' 
    warning: no previously-included files matching '*' found under directory 'docs/build' 
    warning: no previously-included files matching '*' found under directory 'docs/build/htmlhelp' 
    warning: no files found matching 'statsmodels/statsmodelsdoc.chm' 
    no previously-included directories found matching '*/__pycache__' 
    warning: no previously-included files matching '*~' found anywhere in distribution 
    warning: no previously-included files matching '*.swp' found anywhere in distribution 
    warning: no previously-included files matching '*.pyc' found anywhere in distribution 
    warning: no previously-included files matching '*.pyo' found anywhere in distribution 
    warning: no previously-included files matching '*.bak' found anywhere in distribution 
Downloading/unpacking brewer2mpl (from ggplot) 
    Downloading brewer2mpl-1.4.1-py2.py3-none-any.whl 
Downloading/unpacking matplotlib (from ggplot) 
    Downloading matplotlib-1.5.0.tar.gz (54.0MB): 54.0MB downloaded 
    Running setup.py (path:/tmp/pip_build_root/matplotlib/setup.py) egg_info for package matplotlib 
    ============================================================================ 
    Edit setup.cfg to change the build options 

    BUILDING MATPLOTLIB 
       matplotlib: yes [1.5.0] 
        python: yes [2.7.6 (default, Jun 22 2015, 17:58:13) [GCC 
          4.8.2]] 
        platform: yes [linux2] 

    REQUIRED DEPENDENCIES AND EXTENSIONS 
        numpy: yes [version 1.8.2] 
        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 freetype2 (ft2build.h) 
          could not be found. You may need to install the 
          development package.] 
         png: yes [version 1.2.50] 
        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. "setup.py test" will 
          automatically download it. Install nose 0.11.1 or 
          later to run matplotlib.test()/mock is required to 
          run the matplotlib test suite. "setup.py test" will 
          automatically download it. Install mock to run 
          matplotlib.test()] 
      toolkits_tests: yes [nose 0.11.1 or later is required to run the 
          matplotlib test suite. "setup.py test" will 
          automatically download it. Install nose 0.11.1 or 
          later to run matplotlib.test()/mock is required to 
          run the matplotlib test suite. "setup.py test" will 
          automatically download it. Install mock to run 
          matplotlib.test()] 

    OPTIONAL BACKEND EXTENSIONS 
        macosx: no [Mac OS-X only] 
        qt5agg: no [PyQt5 not found] 
        qt4agg: yes [installing, Qt: 4.8.6, PyQt: 4.8.6; PySide not 
          found] 
        gtk3agg: yes [installing, version 3.8.10] 
       gtk3cairo: yes [installing, version 3.8.10] 
        gtkagg: no [The C/C++ header for gtk (gtk/gtk.h) could not 
          be found. You may need to install the development 
          package.] 
        tkagg: no [The C/C++ header for Tk (tk.h) could not be 
          found. You may need to install the development 
          package.] 
        wxagg: no [requires wxPython] 
         gtk: no [The C/C++ header for gtk (gtk/gtk.h) could not 
          be found. You may need to install the development 
          package.] 
         agg: yes [installing] 
        cairo: yes [installing, pycairo version 1.8.8] 
       windowing: no [Microsoft Windows only] 

    OPTIONAL LATEX DEPENDENCIES 
        dvipng: no 
       ghostscript: yes [version 9.10] 
        latex: yes [version 3.1415926] 
        pdftops: yes [version 0.24.5] 

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

    ============================================================================ 
          * The following required packages can not be built: 
          * freetype 
    Complete output from command python setup.py egg_info: 
    ============================================================================ 

Edit setup.cfg to change the build options 



BUILDING MATPLOTLIB 

      matplotlib: yes [1.5.0] 

       python: yes [2.7.6 (default, Jun 22 2015, 17:58:13) [GCC 

         4.8.2]] 

       platform: yes [linux2] 



REQUIRED DEPENDENCIES AND EXTENSIONS 

       numpy: yes [version 1.8.2] 

       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 freetype2 (ft2build.h) 

         could not be found. You may need to install the 

         development package.] 

        png: yes [version 1.2.50] 

       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. "setup.py test" will 

         automatically download it. Install nose 0.11.1 or 

         later to run matplotlib.test()/mock is required to 

         run the matplotlib test suite. "setup.py test" will 

         automatically download it. Install mock to run 

         matplotlib.test()] 

     toolkits_tests: yes [nose 0.11.1 or later is required to run the 

         matplotlib test suite. "setup.py test" will 

         automatically download it. Install nose 0.11.1 or 

         later to run matplotlib.test()/mock is required to 

         run the matplotlib test suite. "setup.py test" will 

         automatically download it. Install mock to run 

         matplotlib.test()] 



OPTIONAL BACKEND EXTENSIONS 

       macosx: no [Mac OS-X only] 

       qt5agg: no [PyQt5 not found] 

       qt4agg: yes [installing, Qt: 4.8.6, PyQt: 4.8.6; PySide not 

         found] 

       gtk3agg: yes [installing, version 3.8.10] 

      gtk3cairo: yes [installing, version 3.8.10] 

       gtkagg: no [The C/C++ header for gtk (gtk/gtk.h) could not 

         be found. You may need to install the development 

         package.] 

       tkagg: no [The C/C++ header for Tk (tk.h) could not be 

         found. You may need to install the development 

         package.] 

       wxagg: no [requires wxPython] 

        gtk: no [The C/C++ header for gtk (gtk/gtk.h) could not 

         be found. You may need to install the development 

         package.] 

        agg: yes [installing] 

       cairo: yes [installing, pycairo version 1.8.8] 

      windowing: no [Microsoft Windows only] 



OPTIONAL LATEX DEPENDENCIES 

       dvipng: no 

      ghostscript: yes [version 9.10] 

       latex: yes [version 3.1415926] 

       pdftops: yes [version 0.24.5] 



OPTIONAL PACKAGE DATA 

        dlls: no [skipping due to configuration] 



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

         * The following required packages can not be built: 

         * freetype 

---------------------------------------- 
Cleaning up... 
Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_root/matplotlib 
Storing debug log for failure in /home/user/.pip/pip.log 
[email protected]:~$ 

我用的命令是:

sudo pip install -U ggplot 

我已经尝试安装Python -dev软件包并升级点:

sudo apt-get install python-pip 
sudo apt-get install python-dev 

我正在运行Ubuntu 14.04和Python 2.7.10 Anaconda 2 .3.0(64位)

+0

蹊跷'matplotlib'。你有没有尝试自行安装它? – Marcin

回答

1

读取日志:

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

所以,有一个关于该命令试试:

sudo apt-get install libfreetype6-dev libxft-dev 
+0

我跑了 sudo apt-get install libfreetype6-dev libxft-dev 并尝试再次安装。一个非常漫长的安装与下面的消息结束: 成功安装ggp​​lot 6个statsmodels brewer2mpl matplotlib SciPy的帕齐大熊猫numpy的蟒蛇,dateutil pytz循环仪pyparsing 不过,当我尝试从IPython的外壳存取权限ggplot,我不能导入它: 在文献[1 ]:from ggplot import * ImportError:没有名为ggplot的模块 –

+0

@LarsvonMond在python shell中工作吗?重新安装ggp​​lot的工作? –

+0

发现此问题。这里提出的解决方案确实解决了这个问题,但ggplot不在我的PYTHONPATH中。不知道为什么。 –