Tom Davies
Tom Davies

Reputation: 73

How to compile .py to .exe in Microsoft Visual Studio Community 2017?

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

Answers (2)

Anonymous
Anonymous

Reputation: 375

Hey Tom!

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

Maaaaa
Maaaaa

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

Related Questions