Pyinstaller Application Error on Embedded OS - python-3.x

I am trying to build an executable to run on Windows XP Embedded. The app itself is a GUI application built with python 3.4.3 and PyQT4-4.11.4. I use pyinstaller to build the exe with the command below :
pyinstaller --clean --windowed --onefile install_wizard.py --icon="images\installer.ico" --name "Installer"
I can build and run the exe on with no issues on a Virtualbox running either XP or XP embedded.
I also have a flash disk with a Windows XP Embedded image, I am able to build the executable, but I get an application error when I try to run it.
Any ideas, I've looked through the Pyinstaller docs and haven't seen anything that would give me a clue.
Looks like it might have something to do wih pyinstaller, I did a simple test using py2exe instead, and that seem to work.
But any info on why XPe does not agree with pyinstaller would be great.

Related

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.

Python cross-platform portable script

I am working on a web scraper in Pycharm. The project consists of around 5 python files and 8 dependencies. I have a virtual env setup in the IDE. How do I package the files and dependencies so they can be saved on any platform and executed from the command line? I looked into Pyinstaller, but it looks like Pyinstaller only creates executables for the OS it is running on. So I would need to create 2 executables for windows and linux. And, I am not necessarily looking for an executable, just need to be able package it so anyone can download it and run it easily.

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?

Run python on Linux without python installed

Currently I'm using cx_Freeze to turn .py into .exe and this works fine with modules and everything, but I can't find any way to make it so it could run in Linux.
Is there any alternative for making it be able to run on Linux? Using something else other than cx_Freeze is fine.
Is there any way to compile it for Linux, while on Windows
From the docs
cx_Freeze works on Windows, Mac and Linux, but on each platform it only makes an executable that runs on that platform. So if you want to freeze your program for Windows, freeze it on Windows; if you want to run it on Macs, freeze it on a Mac.
You should try pyinstaller.
It supports creation of self-encapsulated python executables that work even when the python runtime is not installed.

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