PyInstaller error when executing Plotly Dash .exec file

You may try to add the path of the dash_core_components to the .spec file, and use the .spec file to pyinstaller
like the following example:

a = Analysis(['runme.py'],
             pathex=['D:\\myDash'],
             binaries=[],
             datas=[
                 ('D:\myDash\main_dash\package_venv\Lib\site-packages\dash_html_components','dash_html_components'),
                 ('D:\myDash\main_dash\package_venv\Lib\site-packages\dash_core_components','dash_core_components'),
                 ('D:\myDash\main_dash\package_venv\Lib\site-packages\dash_bootstrap_components','dash_bootstrap_components'),
                 ('D:\myDash\main_dash\package_venv\Lib\site-packages\dash_renderer','dash_renderer'),
                 ('D:\myDash\main_dash\package_venv\Lib\site-packages\dash_table','dash_table')  
             ],
             hiddenimports=[],
             hookspath=[],
             runtime_hooks=[],
             excludes=[],
             win_no_prefer_redirects=False,
             win_private_assemblies=False,
             cipher=block_cipher,
             noarchive=False)