[英]Im trying to turn a python file into an exe file and its not working
I tried making my python file into an exe using pyinstaller main.py --onefile --noconsole
.I was getting an error when I tried opening the exe from dist so i used --debug=all
and it said pyinstaller: error: the following arguments are required: scriptname
.我尝试使用
pyinstaller main.py --onefile --noconsole
将我的 python 文件制作成一个 exe。当我尝试从 dist 打开 exe 时出现错误,所以我使用了--debug=all
并且它说pyinstaller: error: the following arguments are required: scriptname
。
What exactly do i do im not too sure as its my first time.我到底在做什么,因为这是我的第一次,我不太确定。
To convert a python file to exe:要将 python 文件转换为 exe:
Make sure you have pyinstaller installed and up to date确保你已经安装了 pyinstaller 并且是最新的
pip install pyinstaller
in PowerShell type the following:在 PowerShell 中键入以下内容:
pyinstaller --onefile -w 'youfilename.py'
The file name should come out as 1.exe
Make sure are in the right directory文件名应该是
1.exe
确保在正确的目录中
If you have more doubts use this link: https://www.geeksforgeeks.org/convert-python-script-to-exe-file/如果您有更多疑问,请使用此链接: https : //www.geeksforgeeks.org/convert-python-script-to-exe-file/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.