Mauro,

Perhaps the upcoming --exclude option (which is already available in the
.spec file) could be used to exclude wx modules. See:

https://github.com/pyinstaller/pyinstaller/pull/1090

Bryan

On Fri, Nov 14, 2014 at 1:47 PM, Mauro Cavalcanti <[email protected]>
wrote:

> Dear ALL,
>
> Greetings..
>
> While attempting to "freeze" a Python (v2.78) app which uses PyQt4
> (v4.10.4) and Matplotlib (v1.4.2) under Windows XP SP3, using PyInstaller
> (v2.1), I am running into an annoying problem.
>
> At the very beginning of my program, I have the following lines:
>
>     import matplotlib
>     matplotlib.use("Qt4Agg")
>     matplotlib.rcParams["backend.qt4"] = "PyQt4"
>     from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as
> FigureCanvas
>     from matplotlib.figure import Figure
>
> When I run PyInstaller using the line:
>
>     pyinstaller --noconsole --icon=app.ico App.py
>
> the application is correctly frozen into the "dist" folder and it runs
> without any hassles. The problem is, a lot of unwanted files are included
> into the distribution folder! By these "unwanted" files, I refer to the
> several "wx" modules which are obviously useless to my application (since
> it uses Qt and not Wx for the UI). If I manually delete these files from
> the dist folder, the app still runs very well.
>
> So, my big question is: how do I get rid of these unwanted files when
> freezing the app with PyInstaller?
>
> I could find several possible solutions for similar problems with py2exe
> and cx_Freeze, but nothing that refers to PyInstaller (and these is my
> preferred "compiler" because it has been the only cross-platform one that
> seems to work very well under Windows and  Linux).
>
> Thanks in advance for any assistance you can provide!
>
> Also, when running PyInstaller, I got an ugly error message:
>
>     43592 INFO: Processing hook hook-matplotlib
>     Traceback (most recent call last):
>       File "<string>", line 3, in <module>
>       File
> "C:\Python27\lib\site-packages\matplotlib\backends\backend_webagg.py", li
>     ne 30, in <module>
>         raise RuntimeError("The WebAgg backend requires Tornado.")
>     RuntimeError: The WebAgg backend requires Tornado.
>
> But of course I am not using any WebAgg backend (and have no idea what the
> heck is "Tornado"!).
>
> By the end of the freezing process, I got a warning:
>
>     265046 WARNING: lib not found: gdiplus.dll dependency of
> C:\Python27\lib\site-pa
>     ckages\wx-2.8-msw-unicode\wx\wxmsw28u_core_vc.dll
>
> I also would like to get rid of both messages, during the freezing process
> (which I presume I will be, when the problem of getting rid of unwanted
> backends is solved)!
>
> Thanks in advance for any assistance you can provide!
>
> --
> You received this message because you are subscribed to the Google Groups
> "PyInstaller" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/pyinstaller.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Bryan A. Jones, Ph.D.
Associate Professor
Department of Electrical and Computer Engineering
231 Simrall / PO Box 9571
Mississippi State University
Mississippi state, MS 39762
http://www.ece.msstate.edu/~bjones
bjones AT ece DOT msstate DOT edu
voice 662-325-3149
fax 662-325-2298

Our Master, Jesus Christ, is on his way. He'll show up right on
time, his arrival guaranteed by the Blessed and Undisputed Ruler,
High King, High God.
- 1 Tim. 6:14b-15 (The Message)

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pyinstaller.
For more options, visit https://groups.google.com/d/optout.

Reply via email to