![](/img/trans.png)
[英]Im trying to read a log file which is written in text in my Python program but its returning an “No such file or directory”
[英]Im trying to turn a python file into an exe file and its not working
我尝试使用pyinstaller main.py --onefile --noconsole
将我的 python 文件制作成一个 exe。当我尝试从 dist 打开 exe 时出现错误,所以我使用了--debug=all
并且它说pyinstaller: error: the following arguments are required: scriptname
。
我到底在做什么,因为这是我的第一次,我不太确定。
要将 python 文件转换为 exe:
确保你已经安装了 pyinstaller 并且是最新的
pip install pyinstaller
在 PowerShell 中键入以下内容:
pyinstaller --onefile -w 'youfilename.py'
文件名应该是1.exe
确保在正确的目录中
如果您有更多疑问,请使用此链接: https : //www.geeksforgeeks.org/convert-python-script-to-exe-file/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.