How can I convert a .py to .exe for Python?

前端 未结 6 1156
清酒与你
清酒与你 2020-11-22 00:55

I\'m trying to convert a fairly simple Python program to an executable and couldn\'t find what I was looking for, so I have a few questions (I\'m running Python 3.6):

6条回答
  •  天涯浪人
    2020-11-22 01:14

    Python 3.6 is supported by PyInstaller.

    Open a cmd window in your Python folder (open a command window and use cd or while holding shift, right click it on Windows Explorer and choose 'Open command window here'). Then just enter

    pip install pyinstaller
    

    And that's it.

    The simplest way to use it is by entering on your command prompt

    pyinstaller file_name.py
    

    For more details on how to use it, take a look at this question.

提交回复
热议问题