Running a standalone exe made from python 3.5 in windows xp - python-3.x

We created a python program with tensorflow in python 3.5. Based on our research python 3.5 and tensorflow are not supported in xp. But if we converted it to an exe file using cx_freeze, will it work?

The situation won't be any different if you use cx_freeze. There's still the same Python interpreter (just without the interactive shell), and the same libraries (packaged more conveniently), and your scripts (in the form of .pyc files, i.e. Python bytecode). The .exe file you see there just initializes the interpreter (which resides in a dll) and commands it to execute your script.

Related

install python using GUI pyqt

is it possible to develop a pyqt application and check if python is installed, if not can we install python from the same application?
i need to install python through a pyqt standalone application(exe).
when i double click on the exe it should download python and install.
Yes, this is possible. You will need to do the following:
Develop the code on a computer with Python and PyQt, convert the python code into a executable (.exe) file (if you would like to deploy to windows)
Send this .exe file to the user computer and then run it there

How to run GTK3 Python3 script outside of MSYS2 in Windows

How can I make my GTK3+ Python script work outside of Msys2's own Python interpreter, into my own venv (virtual environment) Python3 interpreter? I want to prepare my Python 3 script for distribution to other computers, but without Msys2.
I'm using Windows 10.
I've successfully followed the instructions on GTK's website, to download GTK3+ and the Python bindings, in Windows.
I've installed GTK3+ and the Python bindings using MSYS2. My script runs successfully within MSYS2's Python3 interpreter in C:\msys64\mingw64\bin. However, I want to run my Python script outside of MSYS2, with a separate Python 3 interpreter (venv) - not the one in MSYS2.
From my research, it seems that I need to copy the GTK3 .dll files and icons from
C:\msys64\mingw64\bin
and C:\msys64\mingw64\share
to the Python3 interpreter path that I want, with my script files in there too.
But when I attempt to run my script in the virtual environment, I get:
builtins.ImportError: cannot import name '_gi' from 'gi'
Any ideas? Thanks.
I don't know if that is possible.
But if the final intent is to distribute your app, then you should install PyInstaller inside MSYS2 and generate an executable there. Then you'll be able to distribute and execute your app on any Windows machine.
It will only be possible to run your program using the MSYS2 Python interpreter and with all of the required libraries. You can't just copy files and then run them with the Windows Python interpreter that was built using MSVC.
PyInstaller is a good solution to package an app with the interpreter and all of the libraries. The issue you mentioned about getting errors about no module named '_struct' has been fixed.

report lab libraries not working when python 3.5 script is run from OSX Automator

I have many python 3.5 scripts to handle my business affairs. All of these run perfect from IDLE and from the bash shell. When I create OSX Automator apps they all run well except the included reportlab functions do not work. I have also attempted to create the app with py2app but this fails to find the qt4 and reportlab libraries and fails. Any suggestions?

How to create windows 32/64 executable for a python script written in python 3.3.2?

Please help me with the process needed to convert a python script to a windows executable.
On some web links I did find tutorials that mentioned using py2exe. However, i did not fins a version of py2exe that is compatible with python 3.3.2.
Is there any other way of creating a windows executable from python script written in version 3.3.2 ?
Please note that I need to run the executable on windows 7 x64.
I found following useful links and cx_Freeze worked like a charm with a python script written in python 3.3.2.
Thanks to all for providing the useful information.
Useful links:
Useful replies for converting python script in 3.3.2 to windows executable.
Download cx_Freeze and see relevant documentation.
Once cx_Freeze is installed, use this link for other instructions.

Cross-compile Python in Ubuntu to run on Windows

I need to compile a python script for a project. I am programming it in my Linux(Ubuntu) environment, and I need to have the finalized product be a .exe file to run on windows.
--It needs to be compiled so that the windows machine receiving it doesn't need to have a python environment installed on it.--
I know pyinstaller can compile scripts into executables, but it doesn't do cross-compiling.
An older version of pyinstaller does, but it only supports python2.6
The problem is, I need python 2.7 or 3.+ for my project.
Is there a program I can use to accomplish this, or maybe a workaround... something?

Resources