2

我尝试使用.将我的python文件制作成一个exe pyinstaller main.py --onefile --noconsole 。当我尝试从dist打开exe时出现错误,所以我使用--debug=all它说pyinstaller: error: the following arguments are required: scriptname

作为我的第一次,我到底做了什么我不太确定。

4

1 回答 1

0

To convert a python file to exe:

  1. Make sure you have pyinstaller installed and up to date

    pip install pyinstaller

  2. in PowerShell type the following:

    pyinstaller --onefile -w 'youfilename.py'

The file name should come out as 1.exe Make sure are in the right directory

If you have more doubts use this link: https://www.geeksforgeeks.org/convert-python-script-to-exe-file/

于 2020-10-18T15:28:50.630 回答