PyInstaller 3.3, Pandas 0.21.0, Python 3.6.1.
I was able to solve this thanks to not-yet published/committed fix to PyInstaller, see this and this. AND keeping the ability to pack it into one executable file.
Basically:
-
Locate PyInstaller folder..\hooks, e.g.
C:\Program Files\Python\Lib\site-packages\PyInstaller\hooks
. -
Create file hook-pandas.py with contents (or anything similar based on your error):
hiddenimports = ['pandas._libs.tslibs.timedeltas']
-
Save it + I deleted .spec file, build and dist folders just to be sure.
-
Run
pyinstaller -F my_app.py
.
This fix should work as long as you don’t upgrade or reinstall PyInstaller. So you don’t need to edit .spec file.
Maybe they will include the fix sooner for us! 🙂