5

How can I convert a pyw file to exe using pyinstaller and if its not possible how do i do it with py2exe ?

I am using python 3 !

Saharsh
  • 1,056
  • 10
  • 26
Costel biju
  • 125
  • 1
  • 2
  • 6

2 Answers2

4

just run the following command

pyinstaller -w your_file_name.pyw

Note: you need to install pyinstaller before running the above command.To install, run the following command

pip install pyinstaller
rawwar
  • 4,834
  • 9
  • 32
  • 57
3

Because you use Python 3 it is not possible to use Py2exe (since that is for Python 2 only).

Rename your .pyw program to .py and run (provided you have installed Pyinstaller):

pyinstaller file.py 

And use the --windowed flag to hide the console.

Xantium
  • 11,201
  • 10
  • 62
  • 89