简体   繁体   中英

How can I convert a Python file to a .exe file?

I've seen many options online, but none of them seem to support Python 3.8. Is there any way to convert a python project to a .exe anymore? If so, how can I do that?

EDIT: I've tried PyInstaller multiple times, both before it was recommended here and afterwards, but I keep getting huge error messages that I don't know how to make sense of.

Use pyinstaller .

Example: pyinstaller yourfile.py -F --onefile

This will turn your code into a .exe file on Windows.

To install PyInstaller, you simply use pip, thus pip install PyInstaller or pip3 install PyInstaller .

You can also make sure you have the latest development version of pyinstaller: pip install https://github.com/pyinstaller/pyinstaller/archive/develop.tar.gz

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM