Join GitHub today
pyinstaller fails to ship apscheduler #131
When using pyinstaller to distribute an application it fails to add apscheduler.
It raises a DistributionNotFound error.
I have checked all the posibilites and it seems that the apscheduler code is making some "on the run imports" and therefore pyinstaller does not found the packages it needs to integrate.
However the pyinstaller distribution package can be made succesfully using a "hook file" (https://pythonhosted.org/PyInstaller/#understanding-pyinstaller-hooks) but I can't found the tweaks I need to do inside the hook to let pyinstaller know which imports are needed and where to find them...
I have tested this running python 2.7 on windows 7.
Can anyone help?
I've been able to skip this error by changing the init.py file and simply setting "version='3.1.0'.
Now the exe is generated without errors but when executed it raises LookupError: No trigger by the name "interval" was found.
It has something to do with the imports done by pyinstaller because when working with the .py program it works like a charm.
I've found the solution for this problem here:
The solutions consists on importing the trigger and setup directly.
from apscheduler.triggers.interval import IntervalTrigger
trigger = IntervalTrigger(hours=24, start_date=start_date)