Hack Forums
[Python] Why my exe file doesn't work in other windows - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [Python] Why my exe file doesn't work in other windows (/showthread.php?tid=5858809)



Why my exe file doesn't work in other windows - caijad - Jul 6, 2018

after finishing my Python script (the script Works perfect lonely) i use pyinstaller to compile it:

this is the exact options that i used:

Code
pyinstaller --onefile -w myscript.py

it Works great in my native system but when i try it in a virtual machine an error message appears

Falied to execute myscript.py


RE: Why my exe file doesn't work in other windows - scrubjay - Jul 7, 2018

Google is your friend.

https://stackoverflow.com/questions/13946650/pyinstaller-2-0-bundle-file-as-onefile


RE: Why my exe file doesn't work in other windows - F.A.S.T - Jul 7, 2018

Same problem here. I tried making some app in Windows 10 back then when I had windows. Then took it school and ran it on windows 7, It said "Failed to execute script". This is likely because Python is not a Suitable language for making Executable Files. It's more of a Scripting Language that is used for BOTS and automated Scripts, etc.


RE: Why my exe file doesn't work in other windows - moneyyyy - Jul 19, 2018

Maybe you need to compile it on windows 7


RE: Why my exe file doesn't work in other windows - Smileツ - Jul 19, 2018

Mostly sounds like an error at code, "failed to execute script" means something goes wrong with it.


RE: Why my exe file doesn't work in other windows - Mohinder - Jul 19, 2018

(Jul 7, 2018 06:09 AM)F.A.S.T Wrote:  Same problem here. I tried making some app in Windows 10 back then when I had windows. Then took it school and ran it on windows 7, It said "Failed to execute script". This is likely because Python is not a Suitable language for making Executable Files. It's more of a Scripting Language that is used for BOTS and automated Scripts, etc.

It's not a scripting language, and it's suitable for making exe files.

My best bet is running the .py files on your windows 7 machine and see whats going wrong. Or try to run your exe via a terminal and see what error pops up.


RE: Why my exe file doesn't work in other windows - Skidsuper - Jul 20, 2018

I don't think your exe contains necessary python library files included. The portable needs to be compiled in a way to have the python interpreter included in it if it is to run on a system that doesn't have python or its necessary modules pre installed.


RE: Why my exe file doesn't work in other windows - Smileツ - Jul 20, 2018

(Jul 20, 2018 12:02 AM)Skidsuper Wrote:  I don't think your exe contains necessary python library files included. The portable needs to be compiled in a way to have the python interpreter included in it if it is to run on a system that doesn't have python or its necessary modules pre installed.

It's not even .exe file , op missed the point of using pyinstaller.