Im trying to turn a python file into an exe file and its not working

Viewed 771

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.

1 Answers

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/

Related