-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
kivy-garden.matplotlib "cannot import name '_png' from 'matplotlib'" #69
Comments
My video course seems to not need _png, so my solution for now is to simply comment out the line trying to import it. In my case it is line 256 of garden.matplotlib\backend_kivy.py like so: |
did not work |
Same error since upgrading to Kivy 2.0.0 and matplotlib 3.3.3 |
Tried this fix, but raised another problem. |
I am facing the same issue |
bump |
I did a little bit of tests, this seems to affect usage with matplotlib versions >=3.3.0.
|
Everything was installed properly and I have no errors being picked up in the PyCharm IDE.
I have matplotlib version = latest, I tried to downgrade to version = 3.1.3 but it could not get install on my machine. I don't know why. The downgrading option is really not optimal as I need latest version of mpl for other applications. Thank you for suggesting some ways out of this! |
UPDATE: Commenting out However upon testing it with a simple program like the one in the answer in https://stackoverflow.com/questions/44905416/how-to-get-started-use-matplotlib-in-kivy. I get a bunch of errors:
I hope this is clear and hope to get some advice on this! Many thanks! UPDATE bis: So downgraded to 3.2.2 as @ChromaticIsobar suggested and it works but the depreciation isn't optimal so any other options, would be great! :) |
I have a problem importing the _png from matplotlib while working with python and kivy. ImportError: cannot import name 'png' from 'matplotlib' (C:\Users\djiometsa-jiotio\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\matplotlib_init.py) I have the following versions of modules installed: Thanks for your proposals |
@djiometsa what i did was the following:
i cant test it right now but this should get you on the right track for a temporary fix |
It is still not working for me. After i did the fourth instruction, i had another Importerror
ImportError: cannot import name 'FigureCanvasKivy' from partially initialized module 'backend_kivy' (most likely due to a circular import) |
For me this works. Minimal reproducible example:
|
Holy Crap, Batman (I mean @Mnikley). That works! WTF with matplotlib _png? And why is Kivy rated as #1 in "The 6 Best Python GUI Frameworks for Developers"? |
Guys, downgrading to 3.2.2 works for me |
All five files below fail the same way. I discovered it following along in a Samuel POS course.
.kivy\garden\garden.matplotlib
backend_kivy.py
backend_kivyagg.py
.kivy\garden\garden.matplotlib\examples
test_backend.py
test_events.py
test_plt.py
All five files give the same error. Namely,
ImportError: cannot import name '_png' from 'matplotlib'
I have Python 3.8 and also a venv with 3.6.8. Same results.
The text was updated successfully, but these errors were encountered: