I am new to python and I am trying to create an .exe from py script with pyinstaller but I get this error when trying to run the .exe: Could not find the matplotlib data files. When i run the script in python idle i dont get this error.
I've tried:
import matplotlib
setup(
data_files=matplotlib.get_py2exe_datafiles(),
)
But i get an error saying that setup is not defined.
I've fixed the problem by downgrading matplotlib to version 3.0.3 Using this command: python -m pip install matplotlib==3.0.3
The only thing that worked "sustainably" for me is to also downgrade to and earlier version of Matplotlib version 3.1.3. I can now use pyinstaller. I can also run all program without that horrible warnings and stuff that it gives.
I used pip install matplotlib==3.1.3.
make sure you uninstall all previous matplotlib.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With