r/pythonhelp • • Mar 20 '25

I need to convert from .py to .exe

I already tried auto py to exe and it doesn't work, can someone help me?

1 Upvotes

14 comments sorted by

View all comments

Show parent comment

1

u/FoolsSeldom Mar 20 '25

Still unclear why you want to create an exe (which doesn't hide code well).

1

u/Astresgamer Mar 20 '25

Pure code cannot be submitted in the competition; it must be an application ready to be used on any computer without installing libraries or exporting Python functions. 

1

u/FoolsSeldom Mar 20 '25

Ouch. You were required to use Python? (So they forced you to use am unsupported method to turn into an excecutable). Frustrating.

So, you've tried both auto py and PyInstaller. Neither of these work, you just get "nothing" instead of any error/warning messages?

When you say ".Pickle" do you just mean some Python object that has been "pickled"? Is that containing the P-Model?

There are objects that cannot be serialised by pickle. Wondering if that is the problem.

https://medium.com/@maziarizadi/pickle-your-model-in-python-2bbe7dba2bbb

I haven't used any tools to convert to an exe for a long time, so I am not going to be able to help you. Sorry. I usually deploy using a container or as a remote/web app.

1

u/Goobyalus Mar 20 '25

I think OP is saying that they need to package a pickle file, which is an AI model, into the executable along with the code.

1

u/FoolsSeldom Mar 21 '25

I thought I asked that explicitly. So is that different to standard pickling in Python?

1

u/Goobyalus Mar 21 '25

No, it's just one common (and insecure) way to share models.

I was unclear - I don't think OP has an issue with serialization / deserialization, but an issue with including existing data files in an executable package.

1

u/FoolsSeldom Mar 21 '25

I am unclear on the scope as well. Don't think I can help anyway, as I never turn Python programmes into single executables.

1

u/ninhaomah Mar 21 '25

I sure would be interested in looking at the rules. link ?