Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7445895
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T12:09:46+00:00 2026-05-29T12:09:46+00:00

I have quite a ‘heavy’ python program that I would like compiled to an

  • 0

I have quite a ‘heavy’ python program that I would like compiled to an exe.

The program has a decent amount of imports, but using the PyQT4 framework, I load these imports whilst a splashscreen is visible.
I compile this program to a single .exe file, using pyinstaller (in cmd):

python %pycompile_file% --onefile --noconsole --icon=Icon.ico Script.pyw

However, even though the splashscreen is set to show whilst a significant amount of modules are imported (notably including sympy), and even though it shows instantly and for an adequate time frame when ran through python;
Running the produced .exe results in a serious delay before the splashscreen shows, which is only shown for a very short time before the whole program is loaded.

My suspicion is that compiling from .pyw to .exe has sped the actual ‘code’ up (hence why the splashscreen in shorter), but slows the actual ‘beginning’ of the program’s execution.

How can I fix this so that the .exe does not ‘start so slowly’?

(I suspect compiling to –onefile contributes greatly, but I need the .exe file to be one folder up from all the .dlls and I can not figure out how to make pyinstaller do this)

Thanks!


Windows 7
python 2.7.2
pyinstaller
PyQt4

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T12:09:48+00:00Added an answer on May 29, 2026 at 12:09 pm

    Solved;

    Do not archive the .dlls into the compiled .exe.
    Keep all the files imported by the code (which you wish for the User to interact with without navigating through .dlls) one level up, and create a shortcut to the .exe that has a working directory one up from the .exe.

    You can make such a shortcut using pywin32.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have quite a few RewriteRules in my .htaccess that looks like this RewriteRule
I have quite a few records in my program that I end up putting
I have quite often some very long console commands like: python /var/www/closure-library/closure/bin/calcdeps.py \ -i
I have quite a large and complex table in a MySQL database that would
I have quite a few cells that link to other worksheets/books, etc with standard
I have quite big document in html format that generated from Microsoft Word. It
We have quite a few validation methods that need to access repositories / database
I have quite a big table (about 4M of entries) for emails that are
I have quite a few simple functions that I had previously kept in my
I have quite of bit of data that I will be uploading into Google

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.