Importing Prophet causes pyinstaller to fail
See original GitHub issueHello everyone, I have been using Fbprophet in order to build a sales prediction tool. The project is completed and I would now like to distribute this tool in order to make it accessible to other people, not as experienced with coding/python environments… Therefore I am using pyinstaller (on Windows) in order to generate an .exe file.
The generated .exe file does not work. After some debugging i figured that importing Fbprophet causes pyinstaller to fail.
The error is the following:
Traceback (most recent call last):
File "prova.py", line 2, in <module>
from fbprophet import Prophet, make_holidays
File "c:\users\-\appdata\local\conda\conda\envs\times\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 627, in exec_module
exec(bytecode, module.__dict__)
File "site-packages\fbprophet\__init__.py", line 8, in <module>
File "c:\users\-\appdata\local\conda\conda\envs\times\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 627, in exec_module
exec(bytecode, module.__dict__)
File "site-packages\fbprophet\forecaster.py", line 17, in <module>
File "c:\users\-\appdata\local\conda\conda\envs\times\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 627, in exec_module
exec(bytecode, module.__dict__)
File "site-packages\pystan\__init__.py", line 9, in <module>
File "c:\users\-\appdata\local\conda\conda\envs\times\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 627, in exec_module
exec(bytecode, module.__dict__)
File "site-packages\pystan\api.py", line 15, in <module>
File "c:\users\-\appdata\local\conda\conda\envs\times\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 627, in exec_module
exec(bytecode, module.__dict__)
File "site-packages\pystan\model.py", line 31, in <module>
ModuleNotFoundError: No module named 'Cython'
Does anyone know how to fix this problem?
Thank you for the help!
Issue Analytics
- State:
- Created 4 years ago
- Comments:10 (2 by maintainers)
Top Results From Across the Web
Error with script saved as single file by Pyinstaller
I saved python script in single executable file with Pyinstaller, ... 'Prophet' object has no attribute 'stan_backend' [1413] Failed to ...
Read more >Understanding PyInstaller Hooks
For this or other reasons, PyInstaller cannot reliably find all the needed files, or may include too many files. A hook can tell...
Read more >Solution for the : Error while installing Prophet library on ...
ERROR: Command errored out with exit status 1: 'c:\users\jainh\appdata\local\programs\python\python36\python.exe' -u -c 'import sys, setuptools, tokenize; sys.
Read more >dynlib/dll was no found when the application was frozen ...
I am struggling to make .exe files. the error message was shown that it has problem on number 9 line, so I checked...
Read more >python – Cannot create .exe with pyinstaller from .py with ...
The .py executes correctly when run from the console python test.py but the .exe fails during the import of torchaudio with the following ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I also saw same error message. After some configuration, I was able to run an exe file in a Windows environment.
try this: 1.Add some packages on hiddenimports in main_with_prices.spec file hiddenimports=[ ‘Cython.Plex’, ‘fbprophet’, ‘Cython.Compiler.Lexicon’, ‘Cython.Tempita._looper’, ‘pystan.plots’, ‘pylab’ ]
2.Execute cmd
3.Move some folders directly to the distribute folder
It looks like there was some success here, so I’m going to close this and hopefully future attempts with pyinstaller can use these tips.