How do you compile .py to .exe in Microsoft Visual Studio 2017? I have looked through the menus but can not find what I'm looking for?
You can compile it, but only into a .pyc file which is a compiled python file, which I do not know what it does. I personally chose to installed pyinstaller, and ran pyinstaller [filename].py
from the command line. It is easier than py2exe.
Python is usually not compiled but executed using the python interpreter.
You should only ever compile it to an .exe if you want to execute it on windows without having to install python first. That can be done by using pyinstaller or py2exe (in case you use python 2).
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.