Open SoumyaRanjanPatnaik opened 3 years ago
To use electron with eel try checking the example below: https://github.com/ChrisKnott/Eel/tree/master/examples/09%20-%20Eelectron-quick-start
when i package this example with pyinstaller it stops working at first the error was that it couldn't find electron.exe so I moved electron to the web directory and now electron shows that it couldn't find main.js
import eel
import eel.browsers
eel.init('web')
eel.browsers.set_path('electron', 'node_modules/electron/dist/electron')
eel.start('web/index.html', mode='electron')
like this 😁
For me, this works until I try to build. Then I get the following. Any clue? When I look inside the Contents of the application package, I see no trace of node_modules or Electron (like in Atom.app, for example). It looks like PyInstaller isn't bundling the node modules.
Traceback (most recent call last): File "lbg_eel.py", line 12, in
File "eel/init.py", line 158, in start File "eel/init.py", line 186, in show File "eel/browsers.py", line 63, in open File "eel/electron.py", line 11, in run File "subprocess.py", line 951, in init File "subprocess.py", line 1821, in _execute_child FileNotFoundError: [Errno 2] No such file or directory: 'node_modules/electron/dist/Electron.app/Contents/MacOS/Electron' [10015] Failed to execute script 'lbg_eel' due to unhandled exception: [Errno 2] No such file or directory: 'node_modules/electron/dist/Electron.app/Contents/MacOS/Electron' [10015] Traceback: Traceback (most recent call last): File "lbg_eel.py", line 12, in File "eel/init.py", line 158, in start File "eel/init.py", line 186, in show File "eel/browsers.py", line 63, in open File "eel/electron.py", line 11, in run File "subprocess.py", line 951, in init File "subprocess.py", line 1821, in _execute_child FileNotFoundError: [Errno 2] No such file or directory: 'node_modules/electron/dist/Electron.app/Contents/MacOS/Electron' Saving session... ...copying shared history... ...saving history...truncating history files... ...completed.
I'm sorry for telling you that there is no solution we can't build eel, for my experience i tried with cx_freeze and pyinstaller with no solution, so what i did is to use electron directly like main and using python like backend with js module(child_process) you can interact with python you can check my repository, i am actually using that here and it's easier for deployment.
yea i cant build eel with electron
Hello!! I only have very little knowledge about node.js, so I could not use electron. But eel seems pretty easy to get started with. My system only has firefox installed, so the program I wrote didn't run initially. And although using
mode = 'chrome-app'
allowed me to run the app, it opens as a new tab on my browser. I was going through the documentation just now, and I saw the following line that really got me excited:So, I installed electron using npm and wrote the following dummy code to check if it works.
But I'm getting an error that says electron installation was not found.
I also tried a global installation of electron, but it still didn't work. Can anyone provide any suggestions to run my code through electron? And is it even possible?
Desktop (please complete the following information):