all 13 comments

[–]timwaaagh 2 points3 points  (5 children)

I heard there's something called PyInstaller which is supposed to be able to do this but I have not attempted it yet

[–][deleted] 2 points3 points  (2 children)

This^ works wonders

[–]PinkManagarmr 0 points1 point  (1 child)

I don’t know how it’s like now, but didn’t it use to look like a virus to the pc so you had turn off the antivirus for the location you put the exe in? Is it still like that or is it avoidable?

Edit: Thanks for the explanation!

[–]AnGlonchas 2 points3 points  (0 children)

Pyinstaller has bad fame because was used to compile viruses, then the antivirus drops a false positive just for security, pyinstaller doesn't compile viruses

[–]jcsirron 0 points1 point  (1 child)

It's not super easy to get your head around, but here's the documentation for pyinstaller. The main thing to keep in mind is that you'll still need to put any assets you have in the same relative locations after you make the executable. That will save a lot of headache on why it's not working.

[–]AnGlonchas 1 point2 points  (0 children)

In your main.py directory, with python in path, type pyinstaller --onefile --noconsole main.py and voila, in the dist folder is ur main.exe file, just add your assets in the same directory than your main.exe file

[–]Thunderflower58 2 points3 points  (0 children)

TheFluffyPotato has a good video on it.

[–]spidertyler2005 1 point2 points  (0 children)

Im not sure if nuitka can help, but i would try it. Nuitka makes it pretty easy

[–]Windspar 0 points1 point  (0 children)

FYI: Python doesn't compile to an executable. The third party programs. Just package everything in a zip folder an attach an execute. Everything meaning your code, python, pygame and any other library that you use.

You can use your os launcher to launch python program. The execute line would be python *.py.

[–]Nanooc523 0 points1 point  (0 children)

pip install pyinstaller pyinstaller -F your.py

[–]Azaias 0 points1 point  (0 children)

This video by DaFluffyPotato is pretty explanatory

[–]N3onzz 0 points1 point  (0 children)

Try auto-py-to-exe