Advertisement
ajith_97

Untitled

Jun 13th, 2024
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. import matplotlib
  2. from PyInstaller.utils.hooks import collect_data_files, check_requirement, is_module_satisfies
  3.  
  4. version = getattr(matplotlib, '__version__', None)
  5.  
  6. if version is None:
  7. raise RuntimeError("Failed to get matplotlib version. Ensure matplotlib is properly installed.")
  8.  
  9. print(f"Matplotlib version: {version}")
  10.  
  11. if is_module_satisfies('matplotlib >= 3.7.0'):
  12. datas = collect_data_files('matplotlib', include_py_files=True)
  13. else:
  14. datas = []
  15.  
  16. hiddenimports = [
  17. 'matplotlib.backends.backend_tkagg',
  18. 'matplotlib.backends.backend_agg',
  19. 'matplotlib.backends.backend_ps',
  20. 'matplotlib.backends.backend_pdf',
  21. 'matplotlib.backends.backend_svg'
  22. ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement