pyqtgraph and py2exe for standalone app

997 views
Skip to first unread message

k.bes...@gmail.com

unread,
Jan 23, 2014, 4:47:48 AM1/23/14
to pyqt...@googlegroups.com
Hello Gents,
I really enjoyed using pyqtgraph, but ran  into problems when trynig to build a standalone app with py2exe. Although I followed completely the instructions from the pdf on the website (by the way thank you very much for this guide), the created executable was unable to run.
Maybe a difference is that I am using pyside and not pyqt, so when building the executable I run
python .\setup.py py2exe
instead of
python .\setup.py py2exe --includes sip
 The logfile from the executable was pointing that some modules are missing (_ufuncs_cxx and _validation )
I finally managed to solve the problem by modifying scipy init files:
scipy\special\__init__.py
added: from ._ufuncs_cxx import *

scipy\sparse\__init__.py
added: from .csgraph._validation import *

and after these two modifications rerun the building script and the new executable worked flawlesly.

I am new to python so I think that there must be a more intelligent way to handle this, instead of directly modifying the __init__ files but I still cant find it.

Anyway, I am posting this just to be available as a quick workaround if somebody runs into the same issues.
Greetings for the great job on pyqtgraph.





Luke Campagnola

unread,
Jan 23, 2014, 10:37:38 AM1/23/14
to pyqt...@googlegroups.com
You are very close, but rather than modifying the scipy source, you should be able to modify your application. See: 


Cheers,
Luke

reptile Forex

unread,
Jan 27, 2015, 1:22:39 PM1/27/15
to pyqt...@googlegroups.com
Is there new version of "Bundling applications with PyQtGraph_R16", where was opnion about outaded ?

A. My problem is with py2exe:

1. Anybody solved similar problems?

Python27\lib\site-package
s\PyQt4\uic\port_v3\proxy_base.py' failed
    SyntaxError: invalid syntax (proxy_base.py, line 31)

I try help from many links, but not solve my case:

http://www.qtcentre.org/archive/index.php/t-53822.html

http://forum.bitcraze.se/viewtopic.php?f=8&t=294#p2051



##
In cx_frezee I can "compile" to app, but there is limitation where we can't have all in one file or more friendly structure (or I don't know everythig here). The question is about practice here..

B. How big are files after this type compilation from standard pygraph example?
In my case was 80MB.. and many files.. it's normal?

2. I know that apps with VTK, etc are big.. Some QT GUI can be around 10+20MB
Soo..what I should expect as average size of files with pygraph framework?

3. Any sucessfull apps with pygraph in this area? For example pyrf? Or it's bether to frogot this direction as py > exe and decide to work with scripts on normal python mode?

Aaron Adamson

unread,
Sep 8, 2015, 6:11:41 PM9/8/15
to pyqtgraph
I eventually found success with py2exe by following this guide: http://www.pyqtgraph.org/Bundling%20applications%20with%20PyQtGraph_R16.pdf

My problem though, is even using the simplest possible example there, the final .exe still amounts to over 200MB in size. This seems excessive, and in my case I'm hoping to have something that can be distributed over email (25MB limit in this case). Is there any guidance you can provide on why the application sizes are so large for this, or any tips on getting the file size down significantly?

vas...@gmail.com

unread,
Sep 10, 2015, 5:50:14 AM9/10/15
to pyqt...@googlegroups.com

--
You received this message because you are subscribed to the Google Groups "pyqtgraph" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyqtgraph+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyqtgraph/e618a8ae-caa9-4992-b828-b4bc7fa42e6d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

shrx

unread,
Sep 11, 2015, 4:09:39 AM9/11/15
to pyqtgraph
I have successfully compiled my app which contains pyqtgraph with PyInstaller for Linux, OS X (.app) and Windows (.exe). However, be aware that the compiled applications are similarly large as you mentioned for py2exe, around 80 MB in my case.
Reply all
Reply to author
Forward
0 new messages