Open deshudiosh opened 7 years ago
@deshudiosh I see the error is caused by missing resource files. In particular it could be missing the style.css. How do you pack the exe file? Have you the possibility to specify extra folders to include? If so, you should include the /res folder located in remi library folder
Thanks for quick response. PyInstaller gives option to include files. I'll check this out by the evening. Does Remi search for file like "res/styles.css"? I'll have to include whole path I think.
@deshudiosh Yes, it's better to include the entire path because there are other files included.
I didn't manage to fix the issue. Due to close deadline on project I'll stick to command line interaction for now. I'm gonna get back to it soon. I'll share solution as soon I find one.
any updates on this issue so far ?! I would like to know the steps you did to complete compiling into exe file.
Thanks
Sadly, i gave up on this.
I am facing the same issue @deshudiosh thanks for your reply though
Well it is solved with fresh install for python recommended steps as following :
Thanks to @Counterdoc via Gitter Support Chat
-install python (e.g. 3.5.2)
-download remi (master.zip) from github
1. open cmd and change directory to remi-master
2. in cmd.exe -> python setup.py install
-install pyinstaller -> cmd.exe -> pip3.5.exe install pyinstaller
-restart computer (just to be safe that new path variables for python are set)
-open cmd and change directory to remi-master/examples
-in cmd.exe -> pyinstaller --onefile widgets_overview_app.py
-now some new files and directories are created
-look for the directory called "dist" -> here is your new widgets_overview_app.exe file!
-important ### -> if you try to start this exe file, your antivirus software might block it! (my did!)
-try to start it without antivirus software -> now the exe should start and also your browser
-finished
-i did all these steps right now (20 minute work) and it is working fine
In my case the issue was QT5 , although I did not include it in the py file the pyInstaller include it producing a very large exe file around ~ 68 Mb ,now browser is about 6mb and standalone around 10mb
standalone requires to install on windows :
pip install --upgrade --force-reinstall --no-cache-dir pywebview[winforms]
and thats all ,happy coding !
@deshudiosh kindly confirm and report back, I am on windows 10 x64 fresh 3.5.2 python install
@AymanEG thank you for details! When I come back to this I'll report if I managed to resolve the issue.
I am successful at creating an EXE with no problems now (after I removed PyQt5).
However, the size of the EXE is huge... 188 MB.
I'm not sure what's causing it to be so huge. Can you provide any insight?
Old thread, but in case anyone ever stumbles upon this issue like I did, a simple fix for missing resource files when packaging with PyInstaller is to edit your .spec
file as follows:
Add this to the top of the file so you can use the site-packages folder location later on
from os import path
site_packages = next(p for p in sys.path if 'site-packages' in p)
And edit the datas
part as follows
datas=[(path.join(site_packages, "remi/res"), "remi/res")]
Now PyInstaller will include a remi/res
folder with all the necessary files on dist
and you shouldn't get any erros indicating resource files are missing.
PS. Not sure how this pans out for other PyInstaller configurations like --onefile
and --onedir
, this was tested on the default configurations.
Thank you a lot @eitchtee
Hi
When I run app from pycharm everything works fine. After freezing to single EXE with PyInstaller, I get this errors in cmd:
Any Idea how to solve it? I love the lib, but my app gotta be exe.