creating stand-alone executable for windows from python code

后端 未结 2 2026
悲哀的现实
悲哀的现实 2021-01-01 06:14

I have a python code which uses the pygkt, gtk, ctypes, os and some other modules. I used pyinstaller to create a stand-alone executive of the code. It worked fine on ubuntu

2条回答
  •  甜味超标
    2021-01-01 06:56

    If in Windows, Best way to do it is via Cygwin. Ensure you have Python 3.5+ version not 3.6

    pip install pyinstaller
    

    Go to the directory where the .py file is which needs to be packaged.

    Then run

    $ pyinstaller --onefile test.py
    

    Simple to have a single file executable.

提交回复
热议问题