1

I have created a working Python script containing a Tensorflow model that can identify images. I would like to compile this script in to some form of .exe file that can be used on computers without Python and Tensorflow installed. I would appreciate any help in this regard. Which programs and versions to use, how to use them and may be some code lines to guide me. I have without luck tried py2exe, pyinstaller and cx_freeze. Currently I am using Tensorflow 2.0 and Python 3.7.0.

Thanks in advance.

  • Python cannot be compiled. You can achieve a similar behavior with `Cython`, but for a good result you have to put type annotations. The best way to bring a Python script to other computers is to encapsulate it with a minimal interpreter like the tools you mentioned do. – DPD- Jun 03 '20 at 12:01
  • I've don't have experience with this, but this thread might help https://www.reddit.com/r/deeplearning/comments/664lfp/how_do_you_create_a_selfcontained_deeplearning/ ? – Brian Tingle Jun 03 '20 at 21:50
  • Thank you very much. I see that the problem is a little more complicated than first envisioned. – Anders Traberg Hansen Jun 04 '20 at 07:06

1 Answers1

0

I know you said you didnt have any luck with cx_Freeze but give it a try

I made a guide here answering someone elses question