You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
On Wed, Oct 25, 2017 at 2:31 PM, Enoch ***@***.***> wrote:
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.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#9578>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AARy-K5H-kXOig140K17CYU15-R8PqTNks5sv36MgaJpZM4QGdMm>
.
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 :-/)
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?
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.
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.
Activity
tacaswell commentedon Oct 25, 2017
How did you install Matplotlib? It appears to have not correctly picked up a required dependency.
WeatherGod commentedon Oct 25, 2017
wexi commentedon Oct 25, 2017
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
anntzer commentedon Oct 25, 2017
Can you uninstall matplotlib (pip uninstall matplotlib) and post the log of
(possibly to a gist, it's quite long)? thanks.
wexi commentedon Oct 25, 2017
matplotlib.log
anntzer commentedon Oct 25, 2017
So the log says
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 :-/)
wexi commentedon Oct 25, 2017
No such file or directory
wexi commentedon Oct 25, 2017
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
anntzer commentedon Oct 25, 2017
pip install --no-cache-dir ... backports.functools... ?
Perhaps your cache is also messed up :/
wexi commentedon Oct 25, 2017
didn't help.
I note that matplotlib==2.0.2, which works well, does not depend on backports.functools-lru-cache-1.4
jklymak commentedon Oct 25, 2017
Mine is in
/Users/jklymak/anaconda3/envs/py27/lib/python2.7/site-packages/backports.functools_lru_cache-1.4-py2.7.egg-infoSo maybe look in your/home/enoch/.local/lib/python2.7/site-packagesfor any files relevant tobackports?efiring commentedon Oct 25, 2017
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.
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.
wexi commentedon Oct 25, 2017
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.
Borda commentedon Jan 2, 2019
Uninstall first
pip uninstall backports.functools_lru_cacheand then re-install it
pip install backports.functools_lru_cachehttps://stackoverflow.com/a/47317710/4521646