I am making an eel app, and I finished the html and everything, then I tried to convert the .py file to an .exe file. But cx_Freeze gives the following error:
Trackback (most recent call last):
File
"C:\Users\user\AppData\local\Programs\Python\Python39\Lib\site-packages\cx_Freeze\initscripts\__stratup__.py", line 113, in run
module_init.run(name + "__main__")
File
"C:\Users\user\AppData\local\Programs\Python\Python39\Lib\site-packages\cx_Freeze\initscripts\Console.py", line 15, in run
exec(code, module_main.__dict__)
File "main.py", line 1, in <module>
File
"C:\Users\user\AppData\local\Programs\Python\Python39\Lib\site-packages\eel\__init__.py", line 7, in <module>
import bottle as btl
File "<frozen importlib._bootstrap>", line 1007, in
_find_and_load
File "<frozen importlib._bootstrap>", line 986, in
_find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 664, in
_load_unlocked
File "<frozen importlib._bootstrap>", line 627, in
_load_backward_compatible
File "<frozen zipimport>", line 259, in load_module
File
"C:\Users\user\AppData\local\Programs\Python\Python39\Lib\site-packages\bottle.py", line 74, in <module>
_stdout, _stderr = sys.stdout.write, sys.stderr.write
AttributeError: 'NoneType' object has no attribute 'write'
It seems the error occurs at the first line, the import eel
statement.
I don’t want to use Pyinstaller because they are detected as viruses or Trojans.
Should I add some parameters in setup.py, or what should I do?
Actually, I don't think an eel
executable can be created with cx_Freeze
.
I have tried with pyinstaller
, but with cx_Freeze
, I don't think it would work.