简体   繁体   中英

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 .

What exactly do i do im not too sure as its my first time.

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/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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