Converting Python 3.6 script to .exe? [duplicate]
问题 This question already has answers here : How can I convert a .py to .exe for Python? (6 answers) Closed 2 years ago . I would like to convert a .py file to an .exe. I am using Python 3.6. I already tried py2exe and PyInstaller but they don't seem to work properly with Python 3.6. Here is the traceback from PyInstaller. 回答1: So, let's try Pyinstaller first. $ pyinstaller script.py --onefile This will generate a script.spec file in the spec file you can remove the console, debug mode etc $