FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

matplotlib 2.1.0 "stable" · Issue #9578 · matplotlib/matplotlib · GitHub

Repository navigation

matplotlib 2.1.0 "stable" #9578

Closed
Closed

Description

2.1.0 raises the following import error:

import matplotlib

File "/home/enoch/.local/lib/python2.7/site-packages/matplotlib/init.py", line 128, in
from matplotlib.rcsetup import defaultParams, validate_backend, cycler
File "/home/enoch/.local/lib/python2.7/site-packages/matplotlib/rcsetup.py", line 29, in
from matplotlib.fontconfig_pattern import parse_fontconfig_pattern
File "/home/enoch/.local/lib/python2.7/site-packages/matplotlib/fontconfig_pattern.py", line 32, in
from backports.functools_lru_cache import lru_cache
ImportError: No module named functools_lru_cache

Previous stable version 2.0.2 does not.
Please be guided accordingly. Thanks, Enoch.

Activity

  1. tacaswell commented on Oct 25, 2017

    Member

    How did you install Matplotlib? It appears to have not correctly picked up a required dependency.

  2. WeatherGod commented on Oct 25, 2017

    Member
  3. wexi commented on Oct 25, 2017

    Author

    pip install --upgrade --user matplotlib

    uname -a
    Linux dome 4.13.0-16-generic #19-Ubuntu SMP Wed Oct 11 18:35:14 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

  4. anntzer commented on Oct 25, 2017

    Contributor

    Can you uninstall matplotlib (pip uninstall matplotlib) and post the log of

    $ pip install -v --upgrade --user matplotlib # -v: verbose.
    

    (possibly to a gist, it's quite long)? thanks.

  5. wexi commented on Oct 25, 2017

    Author
  6. anntzer commented on Oct 25, 2017

    Contributor

    So the log says

    Requirement already up-to-date: backports.functools-lru-cache in /home/enoch/.local/lib/python2.7/site-packages (from matplotlib)
    

    Do you indeed have /home/enoch/.local/lib/python2.7/site-packages/backports/functools_lru_cache?
    Can you directly import it?
    You may have a broken install of backports.functools_lru_cache in which case you should just uninstall and reinstall it. (xref pypa/pip#3869 :-/)

  7. wexi commented on Oct 25, 2017

    Author

    No such file or directory

  8. wexi commented on Oct 25, 2017

    Author

    uninstalling, then installing backports.functools_lru_cache is not helping
    This package is probably broken:

    pip install --upgrade --user backports.functools_lru_cache
    Collecting backports.functools_lru_cache
    Using cached backports.functools_lru_cache-1.4-py2.py3-none-any.whl
    Installing collected packages: backports.functools-lru-cache
    Successfully installed backports.functools-lru-cache-1.4

  9. anntzer commented on Oct 25, 2017

    Contributor

    pip install --no-cache-dir ... backports.functools... ?
    Perhaps your cache is also messed up :/

  10. wexi commented on Oct 25, 2017

    Author

    didn't help.
    I note that matplotlib==2.0.2, which works well, does not depend on backports.functools-lru-cache-1.4

  11. jklymak commented on Oct 25, 2017

    Member

    Mine is in /Users/jklymak/anaconda3/envs/py27/lib/python2.7/site-packages/backports.functools_lru_cache-1.4-py2.7.egg-info So maybe look in your /home/enoch/.local/lib/python2.7/site-packages for any files relevant to backports?

  12. efiring commented on Oct 25, 2017

    Member

    The package on pypi installs OK for me. Here is some history showing a conda environment starting without it, then the installation, and then the verification that it imports OK.

    In [1]: from backports.functools_lru_cache import lru_cache
    ---------------------------------------------------------------------------
    ImportError                               Traceback (most recent call last)
    <ipython-input-1-ac5dd3d77a19> in <module>()
    ----> 1 from backports.functools_lru_cache import lru_cache
    
    ImportError: No module named functools_lru_cache
    
    In [2]: exit
    (python2) efiring@manini2:~$ pip install backports.functools_lru_cache
    Collecting backports.functools_lru_cache
      Downloading backports.functools_lru_cache-1.4-py2.py3-none-any.whl
    Installing collected packages: backports.functools-lru-cache
    Successfully installed backports.functools-lru-cache-1.4
    You are using pip version 8.1.2, however version 9.0.1 is available.
    You should consider upgrading via the 'pip install --upgrade pip' command.
    (python2) efiring@manini2:~$ ipython
    Python 2.7.12 |Continuum Analytics, Inc.| (default, Jul  2 2016, 17:43:17)
    Type "copyright", "credits" or "license" for more information.
    
    IPython 5.0.0 -- An enhanced Interactive Python.
    ?         -> Introduction and overview of IPython's features.
    %quickref -> Quick reference.
    help      -> Python's own help system.
    object?   -> Details about 'object', use 'object??' for extra details.
    
    In [1]: from backports.functools_lru_cache import lru_cache
    
    In [2]:
    

    It appears that there is something odd about your python installation--maybe some leftover bits from earlier package installations, or something in PYTHONPATH, or multiple installations. In any case, this is not a matplotlib bug, so I am closing this issue.

  13. wexi commented on Oct 25, 2017

    Author

    If I follow your sequence I get the same results, so it must be something peculiar to my order of module imports. matplotlib is imported quite late. I'll have to step through and compare...
    Thanks.

  14. Borda commented on Jan 2, 2019

    Contributor

    Uninstall first pip uninstall backports.functools_lru_cache
    and then re-install it pip install backports.functools_lru_cache

    https://stackoverflow.com/a/47317710/4521646

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL