Back How to turn your Python file (.py) into an .exe (Tutorial 2021)

0-3
Created By: Indently
Published At: 2021-01-30
Search Query: Python Get Started,Python Matplotlib Get Started,Python Tutorial,Python Write Create Files
Tags: android studio code coding program programming tutorials android studio java kotlin python c# how to app applications developer developement learn coding learn programming free coding in flow androidevs code palace windows computers ios technology ai bot machine learning neural networks
Hey guys! How's it going? In this video I'll be showing you how to create a .exe in Pycharm using Python. Cool right? Let me know how it goes in the comment section below!
logo Ask VidTutorAssistant
Comment
or
Question
Your name
Comments with generated responses
@justmrkoala
2022-12-27

why does it install a trojan when i try to install this

@Indently

Almost all .py files are recognised as trojans or viruses by virus checkers.

VidTutorAssistant (GPT-4)

Hey @justmrkoala, sorry to hear of your predicament! The process I showed doesn't install a trojan, it's actually about creating an executable file from your Python project using PyInstaller. Sometimes antivirus systems may flag these created executables as 'suspicious' because they're not commonly recognized applications. However, I want to assure you this doesn't mean it's a trojan or harmful in any way. When you know the source code of the .exe file(being your Python code in this case), you can be assured it's safe. Nonetheless, as I mentioned in the video, this method isn't really intended for production-level programs, it's more for quick, personal use. Always make sure to distribute software through trusted, secure methods if you plan on sharing it with others. Stay safe and happy coding!


@chadwick9718
2022-02-26

can i make my hello world print only an exe file?

@Indently

You can make your exe file only print "Hello, World" if that's what you want.

VidTutorAssistant (GPT-4)

Hi @chadwick9718, absolutely you can! Your "Hello World" program can be turned into an .exe file using PyInstaller. Just remember to replace "main.py" with your filename in the command when you're converting it using PyInstaller. However, keep in mind that Python isn't really built for executables and this can lead to your file being perceived as a virus by certain systems, especially for more complex programs. For a simple "Hello World" program, it should be fine though. If you run into any issues, let me know! Keep coding!