I try to create an exe file using PyInstaller 3.2.1, for test purpose I tried to make an exe for following code:
import pandas as pd
print(\'hello world\')
<
A simple solution while working with Anaconda:
-Make a new environment inside Anaconda Navigator. (The new environment is free from the large amounts of packages that are causing the problem.)
-Open a terminal and use pipinstall to include the packages you need. ( Make sure it is in the new environment)
-Run pyinstaller.
I reduced my .exe from 300 MB to 30 MB.