pyinstaller: error: the following arguments are required: scriptname

Viewed 5318

i am trying to make a simple executable file using pyinstaller. by following the steps given in link blow.

[https://datatofish.com/executable-pyinstaller/]

but at step 5 i am getting the error for using command "pyinstaller --onefile -main"

pyinstaller: error: the following arguments are required: scriptname

my file name is main and it containt only one line print("hello world")

3 Answers

As the error suggests, you are missing the file name. try doing it like this.

pyinstaller --onefile main.py

pyinstaller --onefile -main.py

With pyinstaller it is good practice do rename your file to main.py. Also if you are using GUI, you will probably want -w argument which means without a console.

although you are making simple executable file of one line code, it is the most simple case. for this you should try this

"pyinstaller main.py"

the other parameters are used for most complicated code where different libraries are used. if yet not satisfied just read documentation.

Related