How to compile a Python script using Tensorflow to a .exe file to be used on a computer without Python and Tensorflow - tensorflow

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.

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

Related

Import "[module]" could not be resolved Pylance (reportMissingImports) in my Jupyter notebook while trying to run code on VS Code

I am trying to do an END-to-END project for BostonHousing on VS Code. I have installed the requirements already from requirements.txt and also chose the Python interpreter as that of my virtual environment version still the error pops like below for Jupyter notebook. The flask file is fine. Please guide me on what's wrong here.
enter link description here
you may got your answer here.check and read carefully.
Import "[module]" could not be resolvedPylance (reportMissingImports)

Problem with importing tensorflow and testing NN

I'm currently working on a program to play a game similar to atari-games. I'm using keras (python 3). I finished writing the code and I want to test it, and I have few questions about the process:
first of all, I have trouble importing tesnorflow for some reason. I've installed it using pip. I've made sure to created new env. before the installation (which finished successfully), but when I try to run my program it says:
ModuleNotFoundError: No module named 'tensorflow'
I also, tried to install the package from within pycharm, but then I get this error:
Could not find a version that satisfies the requirement tensorflow (from versions: )
No matching distribution found for tensorflow
I've checked program requirements (such as pip, python, virtualenv and setuptools versions) and everything seems up to date. perhaps someone could point out what else might be the problem?
Is there any other way I can test the performance of my program?
Thank you very much for your time and attention.
Anaconda is a complete time-saver. I suggest create an enviornment using Anaconda and install the tensorflow by conda install tensorflow If you would like to use the gpu version, conda automatically installs the CUDA and cudnn for you too.

TensorFlow without jupyter notebook

Do I absolutely need to use jupyter notebook to run TensorFlow in Windows ?
I tried the detect object example with the jupyter notebook, it works but I'm not really comfortable, Im used to notepad++ and running python directly on my windows without virtual environment.
I tried to copy past all the codes but I run into many hugs.
No, it is not compulsory to use Jupyter notebook to run Tensorflow on Windows. I personally use PyCharm as my IDE and Anaconda for dependency management (this is completely optional).
I would recommend you to use a proper IDE instead of notepad++ because it's much easier to do debugging using an IDE. You'll also be cloning a lot from Git when you start developing your own model, and usually the open source models out there has a lot of classes and methods in it (take Google's Inception net for example).
Another alternative would be maybe you can start posting about the bugs you are facing, then we can all start helping you.

Tensorflow installation on python 3.4, windows

I'm new to tensorflow and I'm having some problems with the installation. I searched through the official website, without any success. My computer runs on windows, with python version 3.4. None of the sources on the internet seemed to have any command lines for this specific case.
I would greatly appreciate your help:)
I'm pretty sure they added support for python 3.5 only,
But lately they added support for python 3.6 as well.
The only way i can see is that you would have to upgrade, I'm not such a pro with this but that's all i know because i had an import problem with tensorflow which i haven't been able to solve since
You can get the full instructions at Install TF on Windows
I hope you already installed python3 and pip3, if not follow
C:\> pip3 install --upgrade tensorflow

pyinstaller with matplotlib windows

I use pyinstaller in generate pythion program with matplotlib a exe file
The exe is generated well but when use the exe, there is a error said no module named 'tz'
what does it mean?
I have test the pythinstaller with program with numby and pyqt4 without matplotlib, it worksenter image description here well! )
I have find the solution on pyinstaller git hub provided by Cecil Curry.
It is:
This is a known issue. python-dateutil 2.5.0 is currently broken with respect to PyInstaller, unfortunately.
Until python-dateutil issues a new stable release correcting this, consider temporarily downgrading to python-dateutil 2.4.2. Apologies for the mild inconvenience – and thanks for taking the time to report this, nonetheless.
I have tested and it works