Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

installing matplotlib fails using pip on python3 #5140

Closed
Omnipresent opened this issue Sep 25, 2015 · 3 comments
Closed

installing matplotlib fails using pip on python3 #5140

Omnipresent opened this issue Sep 25, 2015 · 3 comments

Comments

@Omnipresent
Copy link

I'm trying to install matplotlib but getting the errors below

(cv3)
~/code                                                                                                                                                      
▶ pip install matplotlib
Collecting matplotlib
  Using cached matplotlib-1.4.3.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 20, in <module>
      File "/private/var/folders/c5/885z1_zn5z985rrq1bz7398r0000gn/T/pip-build-lfkqop5c/matplotlib/setup.py", line 155, in <module>
        result = package.check()
      File "/private/var/folders/c5/885z1_zn5z985rrq1bz7398r0000gn/T/pip-build-lfkqop5c/matplotlib/setupext.py", line 961, in check
        min_version='2.3', version=version)
      File "/private/var/folders/c5/885z1_zn5z985rrq1bz7398r0000gn/T/pip-build-lfkqop5c/matplotlib/setupext.py", line 445, in _check_for_pkg_config
        if (not is_min_version(version, min_version)):
      File "/private/var/folders/c5/885z1_zn5z985rrq1bz7398r0000gn/T/pip-build-lfkqop5c/matplotlib/setupext.py", line 173, in is_min_version
        return found_version >= expected_version
      File "/usr/local/Cellar/python3/3.5.0/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/version.py", line 70, in __ge__
        c = self._cmp(other)
      File "/usr/local/Cellar/python3/3.5.0/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/version.py", line 337, in _cmp
        if self.version < other.version:
    TypeError: unorderable types: str() < int()
    ============================================================================
    Edit setup.cfg to change the build options

    BUILDING MATPLOTLIB
                matplotlib: yes [1.4.3]
                    python: yes [3.5.0 (default, Sep 24 2015, 19:45:12)  [GCC
                            4.2.1 Compatible Apple LLVM 6.1.0 (clang-602.0.53)]]
                  platform: yes [darwin]

    REQUIRED DEPENDENCIES AND EXTENSIONS
                     numpy: yes [version 1.9.3]
                       six: yes [six was not found.pip will attempt to install
                            it after matplotlib.]
                  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 [using tornado version 4.2.1]
                 pyparsing: yes [pyparsing was not found. It is required for
                            mathtext support. pip/easy_install may attempt to
                            install it after matplotlib.]
                     pycxx: yes [Official versions of PyCXX are not compatible
                            with matplotlib on Python 3.x, since they lack
                            support for the buffer object.  Using local copy]
                    libagg: yes [pkg-config information for 'libagg' could not
                            be found. Using local copy.]

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/c5/885z1_zn5z985rrq1bz7398r0000gn/T/pip-build-lfkqop5c/matplotlib

More information about my environment:

▶ python --version
Python 3.5.0
▶ brew install pkg-config
Warning: pkg-config-0.28 already installed
@tacaswell
Copy link
Member

The exception is coming out of disutils and from looking at the order of external packages we check I think that is due to isuess with FreeType. Make sure you have the dev-version of that installed.

We had a flurry of issues like this a while ago and I think it is fixed on current master. Can you try installing master or the 1.5.0rc1 release candidate?

@Omnipresent
Copy link
Author

Thanks. Installing from master worked for me.

@tacaswell
Copy link
Member

Great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants