3

When using %matplotlib inline in Jupyter notebook I'm getting error:

AttributeError: module 'matplotlib' has no attribute 'interactive'

This is the issue.

I have also reffered to this issue in stackoverflow but I could not find the answer.

I tried this :

%matplotlib --list

and found this :

Available matplotlib backends: ['tk', 'gtk', 'gtk3', 'wx', 'qt4', 'qt5', 'qt', 'osx', 'nbagg', 'notebook', 'agg', 'svg', 'pdf', 'ps', 'inline', 'ipympl', 'widget']

It shows, that I have inline in my matplotlib but couldnot use it.

I have also tried :

import matplotlib.pyplot as plt

without using %matplotlib inline but found this error instead :

ModuleNotFoundError: No module named 'matplotlib.pyplot'

Then, I tried to install this module in my conda venv and got this error : error please help me out :)

2 Answers 2

10

Solution for me was to remove matplot lib from my conda environment which forced dependencies to be removed as well. After running installation again :

conda install -c conda-forge matplotlib

all worked well.

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

Comments

0

I try every command line that i found in all forum. But no one work for me . Then i use pip install --upgrade matplotlib . It's work for me . and solve this issue Jupyter Notebook

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.