0

I'm trying to make my python program run on other systems without python installation. I made use of tkinter to create a gui, after creating an exe file with pyinstaller it throws a fatal error "Failed to run script". I've checked my code several times and it works well. I don't know what's wrong.

1

2 Answers 2

2

Create the file using the -F switch only and run from your command line. You should see the actual error.

build: pyinstaller -F your_script.py
run: C:\some_dir\dist\your_script.exe

I have run into issues like this when a module is in a directory that is lowercase and pyinstaller is looking for an uppercase first character. e.g. C:\Python27\Lib\site-packages\queue vs C:\Python27\Lib\site-packages\Queue

Sign up to request clarification or add additional context in comments.

Comments

0

The error is very generic and at this point, it may not be possible to find the actual error what preventing the execution. In order to get actual error please exclude '--windowed' or '--noconsole' parameters during installation and then execute with 'pyinstaller -filename.py --onefile'. Then on execution it will show exact error instead of 'Fatal error! Failed to execute script'. Then you can proceed accordingly.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.