1

We have a standalone PyQGis windows application that is packaged into a multi-file folder by PyInstaller (3.2.1). The OSGeo4W64 python environment is used in the application and the spec file is very similar to the one posted in this other question thread:

Working Windows Standalone .EXE From QGIS Python Script Using PyInstaller?

The resulting package works fine, except its size is very large. In particular, it automatically pulled in libraries such as the following, among other things:

LIBEAY32.dll
libifcoremd.dll
libifportmd.dll
libiomp5md.dll
libiompstubs5md.dll
libmmd.dll
libmysql.dll
libpng16.dll
LIBPQ.dll
libsodium.pyd
libtiff.dll
wxbase28uh_net_vc.dll
wxbase28uh_vc.dll
wxmsw28uh_adv_vc.dll
wxmsw28uh_core_vc.dll
wxmsw28uh_html_vc.dll
mfc90.dll
mfc90u.dll
mfcm90.dll
mfcm90u.dll
Microsoft.VC90.CRT.manifest
Microsoft.VC90.MFC.manifest
msvcm90.dll
MSVCP100.dll
msvcp90.dll
MSVCR100.dll
msvcr90.dll

We removed these libraries to reduce the package size, but how to prevent the Pyinstaller from including these and other non-essential libraries or binaries in the first place? I think one way is to explicitly exclude these using the 'exclude' clause, but I am hoping there is a more systematic way to do this, for example, is there a way to signal to PyInstaller to only go after the first level of dependencies (not to include others recursively).

  • After many trials, I determined that the process of elimination of one group of DLLs at a time and try to install and run a batch functions did the trick for me, I was able to boil it down to a working package. So I consider this question as answered. I would like to post this as answer and close this thread. – For Comment May 3 '17 at 14:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.