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 :)

Hrvoje
  • 13,566
  • 7
  • 90
  • 104

2 Answers2

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.

Hrvoje
  • 13,566
  • 7
  • 90
  • 104
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

mubasshir00
  • 307
  • 3
  • 9