Python matplotlib - ImportError: No module named functools_lru_cache
I have installed matplotlib
for Python using pip
which was completed without error. Yet I get this error when I try to import it:
import matplotlib
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/rishabh/.local/lib/python2.7/site-packages/matplotlib/__init__.py", line 131, in <module>
from matplotlib.rcsetup import defaultParams, validate_backend, cycler
File "/home/rishabh/.local/lib/python2.7/site-packages/matplotlib/rcsetup.py", line 29, in <module>
from matplotlib.fontconfig_pattern import parse_fontconfig_pattern
File "/home/rishabh/.local/lib/python2.7/site-packages/matplotlib/fontconfig_pattern.py", line 28, in <module>
from backports.functools_lru_cache import lru_cache
ImportError: No module named functools_lru_cache
python pip matplotlib
add a comment |
I have installed matplotlib
for Python using pip
which was completed without error. Yet I get this error when I try to import it:
import matplotlib
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/rishabh/.local/lib/python2.7/site-packages/matplotlib/__init__.py", line 131, in <module>
from matplotlib.rcsetup import defaultParams, validate_backend, cycler
File "/home/rishabh/.local/lib/python2.7/site-packages/matplotlib/rcsetup.py", line 29, in <module>
from matplotlib.fontconfig_pattern import parse_fontconfig_pattern
File "/home/rishabh/.local/lib/python2.7/site-packages/matplotlib/fontconfig_pattern.py", line 28, in <module>
from backports.functools_lru_cache import lru_cache
ImportError: No module named functools_lru_cache
python pip matplotlib
"functools_lru_cache.py" : Installpython-backports.functools-lru-cache
packages.ubuntu.com/…
– Knud Larsen
Jun 14 '18 at 15:29
add a comment |
I have installed matplotlib
for Python using pip
which was completed without error. Yet I get this error when I try to import it:
import matplotlib
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/rishabh/.local/lib/python2.7/site-packages/matplotlib/__init__.py", line 131, in <module>
from matplotlib.rcsetup import defaultParams, validate_backend, cycler
File "/home/rishabh/.local/lib/python2.7/site-packages/matplotlib/rcsetup.py", line 29, in <module>
from matplotlib.fontconfig_pattern import parse_fontconfig_pattern
File "/home/rishabh/.local/lib/python2.7/site-packages/matplotlib/fontconfig_pattern.py", line 28, in <module>
from backports.functools_lru_cache import lru_cache
ImportError: No module named functools_lru_cache
python pip matplotlib
I have installed matplotlib
for Python using pip
which was completed without error. Yet I get this error when I try to import it:
import matplotlib
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/rishabh/.local/lib/python2.7/site-packages/matplotlib/__init__.py", line 131, in <module>
from matplotlib.rcsetup import defaultParams, validate_backend, cycler
File "/home/rishabh/.local/lib/python2.7/site-packages/matplotlib/rcsetup.py", line 29, in <module>
from matplotlib.fontconfig_pattern import parse_fontconfig_pattern
File "/home/rishabh/.local/lib/python2.7/site-packages/matplotlib/fontconfig_pattern.py", line 28, in <module>
from backports.functools_lru_cache import lru_cache
ImportError: No module named functools_lru_cache
python pip matplotlib
python pip matplotlib
edited Jun 14 '18 at 14:07
Byte Commander
63.3k26171289
63.3k26171289
asked Jun 14 '18 at 14:02
r kr k
62
62
"functools_lru_cache.py" : Installpython-backports.functools-lru-cache
packages.ubuntu.com/…
– Knud Larsen
Jun 14 '18 at 15:29
add a comment |
"functools_lru_cache.py" : Installpython-backports.functools-lru-cache
packages.ubuntu.com/…
– Knud Larsen
Jun 14 '18 at 15:29
"functools_lru_cache.py" : Install
python-backports.functools-lru-cache
packages.ubuntu.com/…– Knud Larsen
Jun 14 '18 at 15:29
"functools_lru_cache.py" : Install
python-backports.functools-lru-cache
packages.ubuntu.com/…– Knud Larsen
Jun 14 '18 at 15:29
add a comment |
2 Answers
2
active
oldest
votes
Uninstall first
pip uninstall backports.functools_lru_cache
and then re-install it
pip install backports.functools_lru_cache
like described in this answer.
add a comment |
try this I had same problem this morning
sudo apt-get install python-matplotlib
I also am using python3.7
a little later after I installed a few modules. I ran.
pip3 install matplotlib
I can now import matplotlib.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1046554%2fpython-matplotlib-importerror-no-module-named-functools-lru-cache%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Uninstall first
pip uninstall backports.functools_lru_cache
and then re-install it
pip install backports.functools_lru_cache
like described in this answer.
add a comment |
Uninstall first
pip uninstall backports.functools_lru_cache
and then re-install it
pip install backports.functools_lru_cache
like described in this answer.
add a comment |
Uninstall first
pip uninstall backports.functools_lru_cache
and then re-install it
pip install backports.functools_lru_cache
like described in this answer.
Uninstall first
pip uninstall backports.functools_lru_cache
and then re-install it
pip install backports.functools_lru_cache
like described in this answer.
edited Jan 2 at 23:01
zx485
1,45231114
1,45231114
answered Jan 2 at 22:14
Jirka B.Jirka B.
112
112
add a comment |
add a comment |
try this I had same problem this morning
sudo apt-get install python-matplotlib
I also am using python3.7
a little later after I installed a few modules. I ran.
pip3 install matplotlib
I can now import matplotlib.
add a comment |
try this I had same problem this morning
sudo apt-get install python-matplotlib
I also am using python3.7
a little later after I installed a few modules. I ran.
pip3 install matplotlib
I can now import matplotlib.
add a comment |
try this I had same problem this morning
sudo apt-get install python-matplotlib
I also am using python3.7
a little later after I installed a few modules. I ran.
pip3 install matplotlib
I can now import matplotlib.
try this I had same problem this morning
sudo apt-get install python-matplotlib
I also am using python3.7
a little later after I installed a few modules. I ran.
pip3 install matplotlib
I can now import matplotlib.
edited Jun 18 '18 at 17:58
trietend
1928
1928
answered Jun 18 '18 at 17:26
plutesciplutesci
4714
4714
add a comment |
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1046554%2fpython-matplotlib-importerror-no-module-named-functools-lru-cache%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
"functools_lru_cache.py" : Install
python-backports.functools-lru-cache
packages.ubuntu.com/…– Knud Larsen
Jun 14 '18 at 15:29