How to use pyinstaller with matplotlib in use
You can try to solve this problem by installing older versions of the matplotlib package. eg:
pip install matplotlib==3.2.2
In --onefile
mode, based on this commit by a PyInstaller contributor, which references https://github.com/pyinstaller/pyinstaller/issues/5004, you can just modify PyInstaller\hooks\hook-matplotlib.py
so that it has:
datas = [
(mpl_data_dir, "matplotlib/mpl-data"),
]
instead of
datas = [ datas = [
(mpl_data_dir, "mpl-data"),
]