简体   繁体   中英

I can't make plots on the colab with matplotlib

I recently had an error in google colab to make the plots I need. It pame returns the following error.

ImportError: cannot import name 'png' from 'matplotlib' (/usr/local/lib/python3.7/dist-packages/matplotlib/init_.py)

It seems that it is connected with the version of matplotlib, because I looked for this error on the internet and one of the solutions was:

.pip install matplotlib == 3.1.1

It works, but it doesn't make much sense when it comes to Colab

thanks for the code:

!pip install matplotlib == 3.1.1

it work on my colan

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM