Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import matplotlib
- from PyInstaller.utils.hooks import collect_data_files, check_requirement, is_module_satisfies
- version = getattr(matplotlib, '__version__', None)
- if version is None:
- raise RuntimeError("Failed to get matplotlib version. Ensure matplotlib is properly installed.")
- print(f"Matplotlib version: {version}")
- if is_module_satisfies('matplotlib >= 3.7.0'):
- datas = collect_data_files('matplotlib', include_py_files=True)
- else:
- datas = []
- hiddenimports = [
- 'matplotlib.backends.backend_tkagg',
- 'matplotlib.backends.backend_agg',
- 'matplotlib.backends.backend_ps',
- 'matplotlib.backends.backend_pdf',
- 'matplotlib.backends.backend_svg'
- ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement