from moviepy.editor import *
from moviepy.video.io.VideoFileClip import VideoFileClip
from moviepy.video.io.preview import preview
from moviepy.video.fx.resize import resize
from moviepy.video.fx.fadein import fadein
from moviepy.audio.fx.audio_fadein import audio_fadein
os.environ['MATPLOTLIBDATA'] = 'C:\\Program Files\\Python38\\Lib\\site-packages\\matplotlib\\mpl-data\\' # https://stackoverflow.com/questions/63103147/could-not-find-the-matplotlib-data-files
pyinstaller -F -i icon2_5oT_icon.ico "Image Viewer v108.py"
208 INFO: PyInstaller: 3.6
208 INFO: Python: 3.8.3
209 INFO: Platform: Windows-10-10.0.18362-SP0
211 INFO: wrote C:\Users\Sandipan\Dropbox (Sandipan.com)\Development\Picture Viewer\Image Viewer v108.spec
214 INFO: UPX is not available.
218 INFO: Extending PYTHONPATH with paths
['C:\\Users\\Sandipan\\Development\\Picture Viewer',
'C:\\Users\\Sandipan\\Development\\Picture Viewer']
219 INFO: checking Analysis
827 INFO: checking PYZ
954 INFO: checking PKG
1096 INFO: Building because C:\Users\Sandipan\\Development\Picture Viewer\build\Image Viewer v108\Image Viewer v108.exe.manifest changed
1096 INFO: Building PKG (CArchive) PKG-00.pkg
83974 INFO: Building PKG (CArchive) PKG-00.pkg completed successfully.
86023 INFO: Bootloader c:\program files\python38\lib\site-packages\PyInstaller\bootloader\Windows-64bit\run.exe
86026 INFO: checking EXE
86060 INFO: Rebuilding EXE-00.toc because pkg is more recent
86061 INFO: Building EXE from EXE-00.toc
86076 INFO: Copying icons from ['icon2_5oT_icon.ico']
86082 INFO: Writing RT_GROUP_ICON 0 resource with 76 bytes
86082 INFO: Writing RT_ICON 1 resource with 1128 bytes
86082 INFO: Writing RT_ICON 2 resource with 2440 bytes
86083 INFO: Writing RT_ICON 3 resource with 4264 bytes
86083 INFO: Writing RT_ICON 4 resource with 9640 bytes
86083 INFO: Writing RT_ICON 5 resource with 28485 bytes
86095 INFO: Updating manifest in C:\Users\Sandipan\Development\Picture Viewer\build\Image Viewer v108\run.exe.7duzm7h4
86097 INFO: Updating resource type 24 name 1 language 0
86108 INFO: Appending archive to EXE C:\Users\Sandipan\Development\Picture Viewer\dist\Image Viewer v108.exe
86393 INFO: Building EXE from EXE-00.toc completed successfully.
C:\Users\Sandipan\OneDrive\Desktop>"image viewer v108.exe"
pygame 1.9.6
Hello from the pygame community. https://www.pygame.org/contribute.html
Traceback (most recent call last):
File "Image Viewer V108.py", line 183, in <module>
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "c:\program files\python38\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 623, in exec_module
exec(bytecode, module.__dict__)
File "site-packages\moviepy\editor.py", line 60, in <module>
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "c:\program files\python38\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 623, in exec_module
exec(bytecode, module.__dict__)
File "site-packages\moviepy\video\io\sliders.py", line 1, in <module>
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "c:\program files\python38\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 623, in exec_module
exec(bytecode, module.__dict__)
File "site-packages\matplotlib\__init__.py", line 898, in <module>
File "site-packages\matplotlib\cbook\__init__.py", line 480, in _get_data_path
File "site-packages\matplotlib\__init__.py", line 239, in wrapper
File "site-packages\matplotlib\__init__.py", line 534, in get_data_path
File "site-packages\matplotlib\__init__.py", line 239, in wrapper
File "site-packages\matplotlib\__init__.py", line 566, in _get_data_path
RuntimeError: Could not find the matplotlib data files
[19204] Failed to execute script Image Viewer V108
This is issue #5004. We’re midway through fixing it. For now just pip install matplotlib==3.2.2.