2

Operational System: OSX 10.11.3.

I've installed Python: 2.7.10 and 3.4.2.

executed command: pip install matplotlib

pip instalation log

pip install matplotlib Downloading/unpacking matplotlib Downloading matplotlib-1.5.1.tar.gz (54.0MB): 54.0MB downloaded Running setup.py (path:/private/var/folders/x1/prmwnk854tj25kslmzb10l5h0000gn/T/pip_build_calebebrim/matplotlib/setup.py) egg_info for package matplotlib ============================================================================ Edit setup.cfg to change the build options

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

Edit setup.cfg to change the build options

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

Removing temporary dir /private/var/folders/x1/prmwnk854tj25kslmzb10l5h0000gn/T/pip_build_calebebrim... Command python setup.py egg_info failed with error code 1 in /private/var/folders/x1/prmwnk854tj25kslmzb10l5h0000gn/T/pip_build_calebebrim/matplotlib Exception information: Traceback (most recent call last): File "/usr/local/Cellar/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", line 122, in main status = self.run(options, args) File "/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/commands/install.py", line 278, in run requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle) File "/usr/local/Cellar/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", line 1229, in prepare_files req_to_install.run_egg_info() File "/usr/local/Cellar/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", line 325, in run_egg_info command_desc='python setup.py egg_info') File "/usr/local/Cellar/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", line 697, in call_subprocess % (command_desc, proc.returncode, cwd)) InstallationError: Command python setup.py egg_info failed with error code 1 in /private/var/folders/x1/prmwnk854tj25kslmzb10l5h0000gn/T/pip_build_calebebrim/matplotlib

And this one is for: sudo pip install matplotlib

Cleaning up... Removing temporary dir /private/tmp/pip_build_root... Command python setup.py egg_info failed with error code 1 in /private/tmp/pip_build_root/matplotlib Exception information: Traceback (most recent call last): File "/usr/local/Cellar/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", line 122, in main status = self.run(options, args) File "/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/commands/install.py", line 278, in run requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle) File "/usr/local/Cellar/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", line 1229, in prepare_files req_to_install.run_egg_info() File "/usr/local/Cellar/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", line 325, in run_egg_info command_desc='python setup.py egg_info') File "/usr/local/Cellar/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", line 697, in call_subprocess % (command_desc, proc.returncode, cwd)) InstallationError: Command python setup.py egg_info failed with error code 1 in /private/tmp/pip_build_root/matplotlib

What should I do?

I found this: https://github.com/matplotlib/matplotlib/issues/3029/ it say's that executing sudo apt-get pkg-config or, on osx, brew install pkg-config should fix everything.

but executing the brew install pkgconfig I got this:

Warning: pkg-config-0.28 already installed

2
  • 1
    What OS are you using? Commented Mar 31, 2016 at 19:11
  • @Pythogen I'm Using OSX Commented Apr 1, 2016 at 12:10

2 Answers 2

2

You need to use sudo when you use pip on a Mac, otherwise pip can't access the folders it needs to with normal privileges. So, put sudo before your command:

sudo pip install matplotlib

You'll also need to type in your administrator password, but then it'll install.

Sign up to request clarification or add additional context in comments.

1 Comment

Don't need sudo for /usr/local directory
1

I resolve my problems.

what I did?

remove all MACPOrts, brew.

install homebrew agan.

all permissions was reset.

I've use brew install for everything.

than.. Done.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.