2024-04-26 07:18:41 发布
网友
我有一个图形用户界面程序,其中有图标和一些图像和chromedriver。 现在我想将.py文件转换为.exe,在exe中包含图标、图像和chromedriver。我怎样才能做到这一点?你知道吗
我已经尝试pyinstaller和工作,但我必须保持图标和chromedriver内的文件夹中的exe是,然后只有它会工作,但我希望它在exe内,我可以只分发exe到我的朋友没有chromedriver。你知道吗
试试这个
pyinstaller onefile windowed icon=app.ico test.py
另外,在test.spec文件中添加chrome驱动程序
test.spec
binaries=[('path\chromedriver.exe', '.')]
更新spec文件,如pyinstaller test.spec。你知道吗
pyinstaller test.spec
您还可以通过spec文件更新应用程序图标。icon='app.ico'
icon='app.ico'
试试这个
另外,在
test.spec
文件中添加chrome驱动程序更新spec文件,如
pyinstaller test.spec
。你知道吗您还可以通过spec文件更新应用程序图标。
icon='app.ico'
相关问题 更多 >
编程相关推荐