Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AttributeError: module 'matplotlib' has no attribute 'interactive' [closed]

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

like image 249
Hrvoje Avatar asked Mar 17 '26 07:03

Hrvoje


1 Answers

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.

like image 197
Hrvoje Avatar answered Mar 19 '26 22:03

Hrvoje



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!