Reputation: 73
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?
Upvotes: 7
Views: 47493
Reputation: 375
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.
Upvotes: 8
Reputation: 388
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).
Upvotes: 1