[英]Python - Can I use cx_Freeze for creating an EEL executable?
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.我正在制作一个鳗鱼应用程序,我完成了 html 和所有内容,然后我尝试将.py文件转换为.exe文件。 But cx_Freeze gives the following error:
但是 cx_Freeze 给出以下错误:
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.似乎错误发生在第一行
import eel
语句。
I don't want to use Pyinstaller because they are detected as viruses or Trojans.我不想使用 Pyinstaller,因为它们被检测为病毒或木马。
Should I add some parameters in setup.py, or what should I do?我应该在 setup.py 中添加一些参数,还是应该怎么做?
Actually, I don't think an eel
executable can be created with cx_Freeze
.实际上,我认为不能使用
cx_Freeze
创建eel
可执行文件。
I have tried with pyinstaller
, but with cx_Freeze
, I don't think it would work.我曾尝试使用
pyinstaller
,但使用cx_Freeze
,我认为它不会起作用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.