Python Forum
Program built with PyInstaller in Win XP does not run in Win 10
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Program built with PyInstaller in Win XP does not run in Win 10
#1
I sent a program to a customer of mine who has Win 10 (64 bit).
I built the program with PyInstaller in my pc (Win XP (32 bit)).
The program does not run in his pc.
Is this normal? Shouldn't a 32 bit program run in a 64 bit machine?

I also checked it in win 7 32 bit which I have in another partition in my pc:
I just double-clicked it an returned me an error message: Fatal error! Failed to execute script main.
I run it as administrator (right - click -> run as administrator) and runs!
Reply
#2
Here's my Guess. Python is an interpreted language, so every executable file
created with PyInstaller carries a copy of the interpreter with it. The 'executable'
must be created for each os or version thereof that it is to run on. You may get
lucky and have it run on more than one, but should never count on it.
Reply
#3
Quote:The 'executable'
must be created for each os or version thereof that it is to run on.
No this is wrong,all freezing tools shall create executable file to distribute to end-users(no install),
that contains all of your application code as well as the Python interpreter.
Quote:I built the program with PyInstaller in my pc (Win XP (32 bit)).
The program does not run in his pc.
Is this normal? Shouldn't a 32 bit program run in a 64 bit machine?
Why are you still using xp?
It can work but with xp,but can also run into problem with newer Windows version.

Quote:I also checked it in win 7 32 bit which I have in another partition in my pc:
I just double-clicked it an returned me an error message: Fatal error! Failed to execute script main.
Try build it with win-7.
It can also be wrong with the build process.
I like to use virtual environment when i use these Freeze tool.
You can look a t this post where i do show the whole process with pyinstaller.
Reply
#4
Quote:I run it as administrator (right - click -> run as administrator) and runs!

I think that's a big clue right there.

Also, you might want to change the "Compatibility" settings of your executable on the Win 10 machine (and 7, for that matter). Right click the file --> Properties --> Compatibility tab. You can drop it all the way back to Windows 95). There is also a check box to "Run this program as administrator" (so you don't always have to right click the file) and a "Change settings for all users" button.
If it ain't broke, I just haven't gotten to it yet.
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition
Reply
#5
The program runs. If you run it with privileges as you say. A question appears. What does the program do?
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Make console show after script was built with Pyinstaller --NOCONSOLE? H84Gabor 0 1,189 May-05-2022, 12:32 PM
Last Post: H84Gabor

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020