New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No module named 'bottle-websocket' when running an executable made with PyInstaller, including Eel module #87
Comments
Hello ! Did you follow the readme to create your executable? "bottle_websocket" is a module that pyinstaller isn't smart enough to detect as a dependency. If you check how |
Hi, I was actually following the tutorial until it threw some errors about a web folder not being empty. Now I tried with the empty web folder and it worked, thanks. |
Hey guys, Sorry, I'm experiencing the same problem. I tried to follow the readme and I'm bit unsure about step 4, where it says I looked into the main.py and I see hidden-import bottle_websocket but not sure how to build it. Please help, all the your support is greatly appreciated. Thanks |
@vimalpatnaik e.g. I would use on my pc: |
I ran the below d:\EEL>d:\EEL\venv\Scripts\pyinstaller.exe d:\EEL\venv\Lib\site-packages\eel_main_.py d:\EEL\web.py "d:\EEL\pl" --onefile Not sure what permission is required but I can confirm the folder is not in use anywhere. |
You are running it with Pyinstaller and I told to run with Python:
py D:\EEL\venv\Lib\site-packages\eel\__*main*__.py D:\EEL\web.py D:\EEL\pl
--onefile
(make sure _ is doubled)
…On Sun, Dec 30, 2018 at 5:49 PM vimalpatnaik ***@***.***> wrote:
I ran the below
d:\EEL>d:\EEL\venv\Scripts\pyinstaller.exe
d:\EEL\venv\Lib\site-packages\eel_*main*_.py d:\EEL\web.py "d:\EEL\pl"
--onefile
52 INFO: PyInstaller: 3.4
52 INFO: Python: 3.7.0
53 INFO: Platform: Windows-10-10.0.17134-SP0
59 INFO: wrote d:\EEL_*main*_.spec
60 INFO: UPX is not available.
61 INFO: Extending PYTHONPATH with paths
['d:\EEL\venv\Lib\site-packages', 'd:\EEL', 'd:\EEL', 'd:\EEL']
62 INFO: checking Analysis
63 INFO: Building Analysis because Analysis-00.toc is non existent
63 INFO: Initializing module dependency graph...
67 INFO: Initializing module graph hooks...
68 INFO: Analyzing base_library.zip ...
2807 INFO: running Analysis Analysis-00.toc
2824 INFO: Adding Microsoft.Windows.Common-Controls to dependent
assemblies of final executable
required by d:\eel\venv\scripts\python.exe
3433 INFO: Caching module hooks...
3437 INFO: Analyzing d:\EEL\venv\Lib\site-packages\eel_*main*_.py
3619 INFO: Processing pre-find module path hook distutils
4304 INFO: Processing pre-find module path hook site
4305 INFO: site: retargeting to fake-dir
'd:\eel\venv\lib\site-packages\PyInstaller\fake-modules'
4938 INFO: Processing pre-safe import module hook
setuptools.extern.six.moves
7207 INFO: Analyzing d:\EEL\web.py
8286 INFO: Processing pre-safe import module hook
urllib3.packages.six.moves
8928 INFO: Analyzing d:\EEL\pl
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\lib\runpy.py", line 193, in
*run_module_as_main "main", mod_spec) File
"C:\ProgramData\Anaconda3\lib\runpy.py", line 85, in run_code exec(code,
run_globals) File "d:\EEL\venv\Scripts\pyinstaller.exe_main.py", line 9, in
File "d:\eel\venv\lib\site-packages\PyInstaller_main*.py", line 111, in
run
run_build(pyi_config, spec_file, **vars(args))
File "d:\eel\venv\lib\site-packages\PyInstaller_*main*_.py", line 63, in
run_build
PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
File "d:\eel\venv\lib\site-packages\PyInstaller\building\build_main.py",
line 838, in main
build(specfile, kw.get('distpath'), kw.get('workpath'),
kw.get('clean_build'))
File "d:\eel\venv\lib\site-packages\PyInstaller\building\build_main.py",
line 784, in build
exec(text, spec_namespace)
File "", line 17, in
File "d:\eel\venv\lib\site-packages\PyInstaller\building\build_main.py",
line 241, in *init*
self.*postinit*()
File "d:\eel\venv\lib\site-packages\PyInstaller\building\datastruct.py",
line 158, in *postinit*
self.assemble()
File "d:\eel\venv\lib\site-packages\PyInstaller\building\build_main.py",
line 443, in assemble
priority_scripts.append(self.graph.run_script(script))
File "d:\eel\venv\lib\site-packages\PyInstaller\depend\analysis.py", line
219, in run_script
return super(PyiModuleGraph, self).run_script(pathname, caller=caller)
File
"d:\eel\venv\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py",
line 1331, in run_script
with open(pathname, 'rb') as fp:
PermissionError: [Errno 13] Permission denied: 'd:\EEL\pl'
Not sure what permission is required but I can confirm the folder is not
in use anywhere.
Thank you for your help
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#87 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AqawuXjgbQPyrmSIt_aPFmlS6DoSM5WGks5u-OB1gaJpZM4ZJsyz>
.
|
There shouldn't be any * in the name of eel's main.py file just __, Github
adds them tho.
On Sun, Dec 30, 2018 at 5:58 PM Treedye . <misha.mimih.mamchur@gmail.com>
wrote:
… You are running it with Pyinstaller and I told to run with Python:
py D:\EEL\venv\Lib\site-packages\eel\__*main*__.py D:\EEL\web.py
D:\EEL\pl --onefile
(make sure _ is doubled)
On Sun, Dec 30, 2018 at 5:49 PM vimalpatnaik ***@***.***>
wrote:
> I ran the below
>
> d:\EEL>d:\EEL\venv\Scripts\pyinstaller.exe
> d:\EEL\venv\Lib\site-packages\eel_*main*_.py d:\EEL\web.py "d:\EEL\pl"
> --onefile
> 52 INFO: PyInstaller: 3.4
> 52 INFO: Python: 3.7.0
> 53 INFO: Platform: Windows-10-10.0.17134-SP0
> 59 INFO: wrote d:\EEL_*main*_.spec
> 60 INFO: UPX is not available.
> 61 INFO: Extending PYTHONPATH with paths
> ['d:\EEL\venv\Lib\site-packages', 'd:\EEL', 'd:\EEL', 'd:\EEL']
> 62 INFO: checking Analysis
> 63 INFO: Building Analysis because Analysis-00.toc is non existent
> 63 INFO: Initializing module dependency graph...
> 67 INFO: Initializing module graph hooks...
> 68 INFO: Analyzing base_library.zip ...
> 2807 INFO: running Analysis Analysis-00.toc
> 2824 INFO: Adding Microsoft.Windows.Common-Controls to dependent
> assemblies of final executable
> required by d:\eel\venv\scripts\python.exe
> 3433 INFO: Caching module hooks...
> 3437 INFO: Analyzing d:\EEL\venv\Lib\site-packages\eel_*main*_.py
> 3619 INFO: Processing pre-find module path hook distutils
> 4304 INFO: Processing pre-find module path hook site
> 4305 INFO: site: retargeting to fake-dir
> 'd:\eel\venv\lib\site-packages\PyInstaller\fake-modules'
> 4938 INFO: Processing pre-safe import module hook
> setuptools.extern.six.moves
> 7207 INFO: Analyzing d:\EEL\web.py
> 8286 INFO: Processing pre-safe import module hook
> urllib3.packages.six.moves
> 8928 INFO: Analyzing d:\EEL\pl
> Traceback (most recent call last):
> File "C:\ProgramData\Anaconda3\lib\runpy.py", line 193, in
>
>
>
>
> *run_module_as_main "main", mod_spec) File
> "C:\ProgramData\Anaconda3\lib\runpy.py", line 85, in run_code exec(code,
> run_globals) File "d:\EEL\venv\Scripts\pyinstaller.exe_main.py", line 9, in
> File "d:\eel\venv\lib\site-packages\PyInstaller_main*.py", line 111, in
> run
> run_build(pyi_config, spec_file, **vars(args))
> File "d:\eel\venv\lib\site-packages\PyInstaller_*main*_.py", line 63, in
> run_build
> PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
> File "d:\eel\venv\lib\site-packages\PyInstaller\building\build_main.py",
> line 838, in main
> build(specfile, kw.get('distpath'), kw.get('workpath'),
> kw.get('clean_build'))
> File "d:\eel\venv\lib\site-packages\PyInstaller\building\build_main.py",
> line 784, in build
> exec(text, spec_namespace)
> File "", line 17, in
> File "d:\eel\venv\lib\site-packages\PyInstaller\building\build_main.py",
> line 241, in *init*
> self.*postinit*()
> File "d:\eel\venv\lib\site-packages\PyInstaller\building\datastruct.py",
> line 158, in *postinit*
> self.assemble()
> File "d:\eel\venv\lib\site-packages\PyInstaller\building\build_main.py",
> line 443, in assemble
> priority_scripts.append(self.graph.run_script(script))
> File "d:\eel\venv\lib\site-packages\PyInstaller\depend\analysis.py", line
> 219, in run_script
> return super(PyiModuleGraph, self).run_script(pathname, caller=caller)
> File
> "d:\eel\venv\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py",
> line 1331, in run_script
> with open(pathname, 'rb') as fp:
> PermissionError: [Errno 13] Permission denied: 'd:\EEL\pl'
>
> Not sure what permission is required but I can confirm the folder is not
> in use anywhere.
> Thank you for your help
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <#87 (comment)>, or mute
> the thread
> <https://github.com/notifications/unsubscribe-auth/AqawuXjgbQPyrmSIt_aPFmlS6DoSM5WGks5u-OB1gaJpZM4ZJsyz>
> .
>
|
Thanks Misha, ERROR: Can not find path ./libtbb.dylib (needed by /Users/vimal/anaconda3/lib/libmkl_tbb_thread.dylib) When I try to run the app from the dist folder, I see the below in terminal Vimals-MBP:~ vimal$ /Users/vimal/projects/pl/src/dist/web/web ; exit; [Process completed] |
Try using vanilla python for that without anaconda.
чт, 3 січ. 2019 о 10:20 vimalpatnaik <notifications@github.com> пише:
… Thanks Misha,
It worked on windows but when I run the same on a Mac OS X I get the below
error during the packaging.
ERROR: Can not find path ./libtbb.dylib (needed by
/Users/vimal/anaconda3/lib/libmkl_tbb_thread.dylib)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#87 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AqawuT4fXN1nu-bi5lD6glMKgBJTpiV2ks5u_b1EgaJpZM4ZJsyz>
.
|
Thank you that worked but It looks like there is a chrome dependency as I'm getting the below without Chrome install. Could you please advise how to package chrome into the app so it doesn't look for the OS to have chrome installed. Sorry I'm not familiar with this. I appreciate your help. $ python3 web.py |
Chrome/Chromium doesn't get packaged as part of the app - as it stands, this project requires the end-user to have it already available. See comment about this from Eel's creator here: #90 (comment) |
I love the simplicity of eel, but I can't get it running with pyupdater (after using the hidden-module flag):
|
You should use PyInstaller to pack things up for an executable file.
ср, 6 лют. 2019 о 11:18 AxelRHD <notifications@github.com> пише:
… I love the simplicity of eel, but I can't get it running with pyupdater
(after using the hidden-module flag):
"D:\Dokumente\Development\python-projects\updater-min\pyu-data\deploy\EEL
Test.exe" Traceback (most recent call last): File "server.py", line 1, in
<module> File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked File
"c:\programs\python\python37-32\lib\site-packages\PyInstaller\loader\pyimod03_importers.py",
line 627, in exec_module exec(bytecode, module.__dict__) File
"site-packages\eel\__init__.py", line 17, in <module> FileNotFoundError:
[Errno 2] No such file or directory:
'C:\\Users\\DEU131~1\\AppData\\Local\\Temp\\_MEI171962\\eel\\eel.js'
[16328] Failed to execute script server
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#87 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AqawuZMBpK4_zmzw9WVqE8tTkW9OLG95ks5vKp3sgaJpZM4ZJsyz>
.
|
pyupdater is wrapping up pyinstaller. But I'm not that experienced with Python to fully understand the changes made to the original pyupdater through Eel and so bringing the ends of Eel and pyupdater together. It would be a great benefit if self updates over pyupdater where possible. Maybe an adaption of the main.py script for pyupdater is possible? |
To those who are still facing this issue. eel.init('web') |
When building for one file in windows with pyinstaller you need to add argument '--hidden-import eel' - this solution is working for me |
I Made a simple program, tried to make an executable out of it via PyInstaller. No errors whatsoever, but when running this executable it crashes on the first line - import eel, telling - there is no module called 'bottle-websocket'.
I checked pip: eel, bottle-websocket are installed. Can't figure out what's the problem. Runs perfectly as a raw python file, but when executed throws this weird error. Attachments:
main.py:
Error: CMD error
I found this in PyInstaller Warning file:
PyInstaller's Log
The text was updated successfully, but these errors were encountered: