r/learnpython • • Oct 21 '26

How To Compile .PY Online

i have a .py file i want to compile to .exe online but no idea how to do this

and i don't want to install python on my computer just to compil

0 Upvotes

26 comments sorted by

View all comments

20

u/therouterguy Oct 21 '26

Yea lets compile something on a system out of your control that is not unsafe at all. Btw Python code is not really compiled normally.
Why do you want tondo this

1

u/OkTill2666 Oct 22 '26

yeah the security angle alone makes this a bad idea tbh

-12

u/Educational_Virus672 Oct 21 '26

you broke the first rule you are not polite. please dont be mean they are absolutely new and no python is more hybrid type of language so you can copmpile most of code (excluding some features) this is exactly what cython does but it still needs the runtime and type checking

-1

u/Ok_Roll_8698 Oct 21 '26

its a PyQt6 application i want to make .exe

i guess im ok with installing python on my windows pc if that is the only way to do it

im just very new to python and now shore what i need to install and how to run my .py file

3

u/therouterguy Oct 21 '26

Start by googling for how to install python on windows. There are extensive guides on that. I suppose the thing you want to run had a README

1

u/chiibosoil Oct 21 '26

If you are just now trying to set up python environment on your windows machine. Then I'd recommend learning how to do it in WSL2 (Windows Subsystem for Linux 2).

Some python library won't run on native Windows and requires Linux kernel (which WSL2 provides).

1

u/Educational_Virus672 Oct 21 '26 edited Oct 21 '26

okay but you need to install pyinstaller to run it as .exe so after installing the python SDK(for devlopers) run command
pip install pyinstaller

it install the tool and use pyinstaller manual to use it also dont just trust any website ppl give try using virustotal it is the best virus detector i know and you dont even need to install it it is a website

-4

u/Jazzlike_Platypus430 Oct 21 '26

not unsafe 😂

5

u/TheNapkinThief Oct 21 '26

Massively unsafe.

Say I'm a bad guy running website that 'turns py files into .exe'. I take your py file, add my malicious code, give you a .exe. You run the .exe and I now have a backdoor into your system/running my coin miner/keylogger etc etc.

-1

u/Jazzlike_Platypus430 Oct 21 '26

I wouldn't object if it were "not safe at all" 😂

2

u/TheNapkinThief Oct 21 '26

Oh my bad, didn't connect the sarcasm dots...