Creating an EXE from a Streamlit app using cx_Freeze on obfuscated scripts by pyarmor #2406
Unanswered
Waschbrettwade
asked this question in
Q&A
Replies: 1 comment 1 reply
-
When you try to freeze an obfuscated Python script, freeze is unable to find your script's dependencies, only pyarmor_runtime. The way I solved this was by adding an extra script for freezing, which only imports the dependencies your code needs (you can try doing this by copying and including all the imports you make in the plain script). Declare it along with setup.py to be freezing together. After build, you could delete it; it will serve so that ex_freeze can track its dependencies. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi there,
I have successfully turned my dummy Streamlit app into an EXE using cx_Freeze. However, I also want to protect my code. That's why I also obfuscate my scripts using pyarmor. Now, whether I first obfuscate my scripts and then create the exe, or the other way around, something doesn't quite work. I get the EXE to correctly execute at first. But when I press any button in the Streamlit app, I get
When using obfuscated scripts without cx_Freeze, there is no problem. Does anyone have an idea what's causing this and how to fix this? Thank you very much!
Beta Was this translation helpful? Give feedback.
All reactions