提问者:小点点

Python pip安装异常matplotlib


操作系统:OSX 10.11。3.

我已经安装了Python:2.7.10和3.4.2。

执行命令:pip安装matplotlib

pip安装日志

pip安装matplotlib下载/解包matplotlib下载matplotlib-1.5。1.焦油。gz(54.0MB):54.0MB下载的运行设置。py(路径:/private/var/folders/x1/prmwnk854tj25kslmzb10l5h0000gn/T/pip\u build\u calebebrim/matplotlib/setup.py)包matplotlib的鸡蛋信息====================================================================================================================================================================================================================================================================================================================================================。cfg以更改生成选项

BUILDING MATPLOTLIB
            matplotlib: yes [1.5.1]
                python: yes [2.7.8 (default, Oct 19 2014, 16:06:28)  [GCC
                        4.2.1 Compatible Apple LLVM 5.1 (clang-503.0.40)]]
              platform: yes [darwin]

REQUIRED DEPENDENCIES AND EXTENSIONS
                 numpy: yes [version 1.10.4]
              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 [using tornado version 4.3]
             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.5.23]
                 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: yes [installing, darwin]
                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, version 81008]
                 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.10]
                 latex: no
               pdftops: no

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:
============================================================================

编辑设置。cfg以更改生成选项

建筑MATPLOTLIB

        matplotlib: yes [1.5.1]

            python: yes [2.7.8 (default, Oct 19 2014, 16:06:28)  [GCC

                    4.2.1 Compatible Apple LLVM 5.1 (clang-503.0.40)]]

          platform: yes [darwin]

所需的依赖项和扩展

             numpy: yes [version 1.10.4]

          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 [using tornado version 4.3]

         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.5.23]

             qhull: yes [pkg-config information for 'qhull' could not be

                    found. Using local copy.]

可选子包

       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]

可选后端扩展

            macosx: yes [installing, darwin]

            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, version 81008]

             wxagg: no  [requires wxPython]

               gtk: no  [Requires pygtk]

               agg: yes [installing]

             cairo: no  [cairocffi or pycairo not found]

         windowing: no  [Microsoft Windows only]

可选乳胶依赖项

            dvipng: no

       ghostscript: yes [version 9.10]

             latex: no

           pdftops: no

可选包数据

              dlls: no  [skipping due to configuration]

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

                    * The following required packages can not be built:

                    * freetype

正在删除临时目录/private/var/folders/x1/prmwnk854tj25kslmzb10l5h0000gn/T/pip\u build\u calebebrim。。。命令python设置。py egg_info失败,错误代码为/private/var/folders/x1/prmwnk854tj25kslmzb10l5h0000gn/T/pip_build_calebebibrim/matplotlib异常信息:回溯(最近一次调用):文件“/usr/local/ceral/python/2.7.8_2/Frameworks/python2.7/lib/python2.7/site packages/pip-1.5.6-py2.7.egg/pip/basecommand.py”,第122行,主状态=自我。运行(options,args)文件“/usr/local/ceral/python/2.7.8_2/Frameworks/python.Frameworks/Versions/2.7/lib/python2.7/site packages/pip-1.5.6-py2.7.egg/pip/commands/install.py”,第278行,在运行需求集中。准备文件(finder,force_root_egg_info=self.bundle,bundle=self.bundle)文件“/usr/local/cillar/python/2.7.8_2/Frameworks/python.framework/Versions/2.7/lib/python2.7/site packages/pip-1.5.6-py2.7.egg/pip/req.py”,第1229行,在准备需要安装的文件中。在run_egg_info命令_desc='python安装程序中,运行_egg_info()文件“/usr/local/ceral/python/2.7.8_2/Frameworks/python.Frameworks/2.7/lib/python2.7/site packages/pip-1.5.6-py2.7.egg/pip/req.py”,第325行。py egg_info')File“/usr/local/ceral/python/2.7.8_2/Frameworks/python.framework/Versions/2.7/lib/python2.7/site packages/pip-1.5.6-py2.7.egg/pip/util.py”,第697行,在call_subprocess%(command_desc,proc.returncode,cwd))安装错误:command python setup。py egg_info在/private/var/folders/x1/prmwnk854tj25kslmzb10l5h0000gn/T/pip_build_calebebrim/matplotlib中失败,错误代码为1

这一个用于:sudopip安装matplotlib

清理。。。正在删除临时目录/private/tmp/pip\u build\u根目录。。。命令python设置。py egg_info失败,错误代码为1,位于/private/tmp/pip_build_root/matplotlib异常信息:回溯(最近一次调用):文件“/usr/local/ceral/python/2.7.8_2/Frameworks/python.framework/Versions/2.7/lib/python2.7/site packages/pip-1.5.6-py2.7.egg/pip/basecommand.py”,第122行,主状态=self。运行(options,args)文件“/usr/local/ceral/python/2.7.8_2/Frameworks/python.Frameworks/Versions/2.7/lib/python2.7/site packages/pip-1.5.6-py2.7.egg/pip/commands/install.py”,第278行,在运行需求集中。准备文件(finder,force_root_egg_info=self.bundle,bundle=self.bundle)文件“/usr/local/cillar/python/2.7.8_2/Frameworks/python.framework/Versions/2.7/lib/python2.7/site packages/pip-1.5.6-py2.7.egg/pip/req.py”,第1229行,在准备需要安装的文件中。在run_egg_info命令_desc='python安装程序中,运行_egg_info()文件“/usr/local/ceral/python/2.7.8_2/Frameworks/python.Frameworks/2.7/lib/python2.7/site packages/pip-1.5.6-py2.7.egg/pip/req.py”,第325行。py egg_info')File“/usr/local/ceral/python/2.7.8_2/Frameworks/python.framework/Versions/2.7/lib/python2.7/site packages/pip-1.5.6-py2.7.egg/pip/util.py”,第697行,在call_subprocess%(command_desc,proc.returncode,cwd))安装错误:command python setup。py egg_info在/private/tmp/pip_build_root/matplotlib中失败,错误代码为1

那我该怎么办?

我发现:https://github.com/matplotlib/matplotlib/issues/3029/据说执行sudo apt get pkg config或在osx上执行brew install pkg config应该可以修复所有问题。

但是执行brew安装pkgconfig我得到了这个:

警告:pkg-config-0.28已安装


共2个答案

匿名用户

在Mac上使用pip时,需要使用sudo,否则pip无法以正常权限访问所需的文件夹。所以,把sudo放在命令前面:

sudo pip install matplotlib

您还需要输入管理员密码,然后才能安装。

匿名用户

我解决我的问题。

我做了什么?

删除所有MACPORts,酿造。

安装自制的agan。

所有权限已重置。

我已经使用brew安装了一切。

比完成。