0
import matplotlib.animation as animation

The error show up when I import matplotlib.animation
I tried to reinstall numpy scipy and matplotlib, but it didn't work

environment list  
    -torch=1.12.1  
    --numpy=1.23.4  
    --scipy=1.9.2  
    --networkx=2.8.7  
    --matplotlib=3.6.1  
    --dgl=0.5.1  
6
  • Just restart the Laptop/Pc...It maybe some cache issues..I've encountered import issues with matplotlib many times .. Just re-installing/ restarting laptop would fix the issues. Commented Oct 16, 2022 at 12:56
  • I reboot my Laptop,but it doesn't work.... Commented Oct 16, 2022 at 13:36
  • what happens when you import matplotlib on its own ? Commented Oct 16, 2022 at 13:40
  • the same error. Commented Oct 16, 2022 at 13:52
  • Try doing same in virtual Environment..Create a vittual Environmnet & install requiremnts file inside it Commented Oct 16, 2022 at 14:03

1 Answer 1

2

I had the same problem yesterday, and I found out that the error didn't only occur in matplotlib, but actually in other packages (at least for me). So I figured out that the error was from numpy. I just uninstalled numpy and installed it again:

pip uninstall -y numpy
pip install numpy

Hope it works for you!

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.