简体   繁体   English

.py到exe,无需其他文件

[英].py to exe without other files

Using pyinstaller, I created a .exe file and other files. 使用pyinstaller,我创建了.exe文件和其他文件。 Can I create ONLY the .exe, without other files, or is there any way to put together all files? 是否可以仅创建.exe文件而不包含其他文件,或者是否可以将所有文件放在一起? I need your help. 我需要你的帮助。

这是我的截图

Run this command; 运行此命令; pyinstaller --onefile your_script_name.py

If you are a learner, you will get good insight into how to create an exe file using PyInstaller. 如果您是一名学习者,则将深入了解如何使用PyInstaller创建exe文件。 I provide below the github link for a very small project. 我在github链接下面提供了一个非常小的项目。 You will be able to create exe using the following command. 您将可以使用以下命令创建exe。

setup.py clean develop install

Github Link : https://github.com/debjava/py-exe-creator1 Github链接: https : //github.com/debjava/py-exe-creator1

First you download the project and run the above command just to see the exe. 首先,您下载项目并运行上面的命令以查看exe。

As per the above project, you can similarly put all your project file and you can use the same command to run to create exe file using pyinstaller. 对于上述项目,您可以类似地放置所有项目文件,并且可以使用相同的命令运行以使用pyinstaller创建exe文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM