Differences between revisions 9 and 32 (spanning 23 versions)
Revision 9 as of 2008-01-14 12:25:47
Size: 4136
Comment:
Revision 32 as of 2012-06-25 15:49:01
Size: 6173
Editor: LeeKamentsky
Comment: Recipe for zmq
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
 * ConfigImportProblems  Fixing problems with importing Bio.Config files from library.zip  * ConfigImportProblems Fixing problems with importing Bio.Config files from library.zip
Line 6: Line 7:

== ConfigObj ==
 * ConfigObj does not work right if you installed using easy_install. Just download configobj.py and validate.py from http://www.voidspace.org.uk/python/configobj.htm
Line 7: Line 12:
 * Py2exeAndCtypesComDllServer Creating a ctypes.com dll com server
 * Py2exeAndCtypesComExeServer Creating a ctypes.com exe com server
 * Py2exeAndCtypesComDllServer Creating a ctypes.com dll com server
 * Py2exeAndCtypesComExeServer Creating a ctypes.com exe com server

== dpkt ==
 * [[dpkt]] Fixing problems initializing class attributes

== ftplib ==
you may need to try including wsock32.dll or winsock.dll. Sometimes one works, sometimes the other works. Having both might cause problems.
Line 10: Line 22:
 * BetterCompression  Getting complete wxPython Programs down to around 4 Megabytes
 * SetupLanguage  How to localize the language with [http://starship.python.net/crew/theller/py2exe/ py2exe] and [http://www.jrsoftware.org/isinfo.php InnoSetup]
 * QuickStartIcons  How to add Startup-Links to the Quickstart-Bar & the Desktop using [http://www.jrsoftware.org/isinfo.php InnoSetup] together with Py2Exe
 * BetterCompression Getting complete wxPython Programs down to around 4 Megabytes
 * SetupLanguage How to localize the language with [[http://starship.python.net/crew/theller/py2exe/|py2exe]] and [[http://www.jrsoftware.org/isinfo.php|InnoSetup]]
 * QuickStartIcons How to add Startup-Links to the Quickstart-Bar & the Desktop using [[http://www.jrsoftware.org/isinfo.php|InnoSetup]] together with Py2Exe
Line 15: Line 28:

== lxml ==
 * if missing _elementhpath, either pull whole lxml library in packages=..., or put "from lxml import _elementhpath as _dummy" somewhere in code; in both cases also pull gzip in packages=...
Line 17: Line 34:

== multiprocessing ==
 * See [[http://docs.python.org/library/multiprocessing.html#multiprocessing.freeze_support|multiprocessing.freeze_support]].
Line 20: Line 41:
 * Numpy 1.4.0 and Py2exe 0.6.9 may have issues compiling to an executable. The executable may run on your computer, but wont run on other machines. You may get and error that says the module cant be found or a DLL load failure referencing numpy files (.pyc,.pyo). The solution to this is to use numpy 1.3.0.
Line 21: Line 44:
 * ["os.popen"] If you're getting failures when the CWD is a UNC path like {{{\\host\dirname\...}}}  * [[os.popen]] If you're getting failures when the CWD is a UNC path like {{{\\host\dirname\...}}}
Line 23: Line 47:
 * ["PIL and py2exe"] If you're getting ''cannot identify image file'', read this
 * ["PIL and Fontfiles"] If you're getting ''Cannot find font file'', read this
== PyGTK ==
 * ["Py2exeAndPyGTK"] A recipe for py2exe and PyGTK
 * [[py2exeAndPIL]] If you're getting ''cannot identify image file'', read this
 * [[PILAndFontfiles]] If you're getting ''Cannot find font file'', read this

== protobuf ==
 * GoogleProtobuf If you're getting ''The following modules appear to be missing''

== pubsub ==
 * Add {{{'pubsub.*', 'pubsub.core.*', 'pubsub.core.kwargs.*'}}} to {{{include_packages}}} if using the new interface, otherwise add {{{'pubsub.*', 'pubsub.core.*', 'pubsub.core.arg1.*'}}} when using the old interface.

== PyGTK (and Kiwi) ==
 * [[Py2exeAndPyGTK]] A recipe for py2exe and PyGTK

== pyodbc ==
 * [[PyODBC]] additional configuration required to include {{{decimal}}} package

== PyOpenGL ==
 * [[PyOpenGL]] A hack to get py2exe and PyOpenGL working
Line 28: Line 66:
 * Py2exeAndPyQt  If you're getting {{{File "qt.pyc", line 7, in __load Import Error: No module named sip}}}, read this  * Py2exeAndPyQt If you're getting {{{File "qt.pyc", line 7, in __load Import Error: No module named sip}}}, read this
Line 31: Line 70:
Line 32: Line 72:
 * PythonCardSetup  Getting pythoncard to work by editing setup.py  * PythonCardSetup Getting pythoncard to work by editing setup.py
Line 35: Line 76:
Line 36: Line 78:
 * ["Py2exeAndPyXML"]  If you're getting ''File "xml\sax\saxexts.pyc", line 77, in make_parser; xml.sax._exceptions.SAX'''Reader''''''Not''''''Available: No parsers found'''''''', read this. '''  * [[Py2exeAndPyXML]] If you're getting ''File "xml\sax\saxexts.pyc", line 77, in make_parser; xml.sax._exceptions.SAX'''Reader''''''Not''''''Available: No parsers found'''''''', read this. '''
Line 40: Line 83:
I like to distribute my application with py2exe but I can not make py2exe setup script to recognize that x.ptl is a valid  python files. Any idea how to do this? - impossible: ["Quixote & py2exe"]  HAM20040602 I like to distribute my application with py2exe but I can not make py2exe setup script to recognize that x.ptl is a valid python files. Any idea how to do this? - impossible: [[py2exeAndQuixote]] HAM20040602

== Raven ==
It seems Raven uses its own function to import modules and cache them so py2exe isn't able to figure out which modules are needed. You need to manually specify them with '''options={"py2exe": {"includes": ["raven.events", "raven.processors"]}}'''.
Line 43: Line 89:
 * ["PIL and reportlab"]  If you've read ["PIL and py2exe"]  and still get ''cannot identify image file'', read this  * [[PILAndReportlab]] If you've read [[py2exeAndPIL]] and still get ''cannot identify image file'', read this
Line 45: Line 92:
 * ScipyImportProblems  Using py2exe with scipy ends up with missing {{{cephes}}} and {{{__cvs_version__}}} messages.  Here is a fix.  * ScipyImportProblems Using py2exe with scipy ends up with missing {{{cephes}}} and {{{__cvs_version__}}} messages. Here is a fix.
Line 48: Line 96:
Line 50: Line 99:
Line 51: Line 101:
 * Py2exeAndWin32com  Creating a win32com exe and/or dll com server
 * WinShell  Using win32com.shell with py2exe 0.5
 * IncludingTypelibs  Allowing use of makepy generated typelibs
 * UsingEnsureDispatch  Use a prog_id and generate 'typelibs' at runtime
 * Py2exeAndWin32com Creating a win32com exe and/or dll com server
 * [[win32com.shell]] Including with py2exe 0.6
 * IncludingTypelibs Allowing use of makepy generated typelibs
 * UsingEnsureDispatch Use a prog_id and generate 'typelibs' at runtime
Line 57: Line 108:

== win32ui ==
 * Py2exeAndWin32ui Using win32ui with py2exe 0.6 and python 2.6
Line 58: Line 113:
 * Py2exeAndwxPython  If you're getting ''wxObjectPtr not found'', read this  * Py2exeAndwxPython If you're getting ''wxObjectPtr not found'', read this

== zmq ==
 * Py2exeAndzmq If py2exe can''t find libzmq.dll

Working with Various Packages and Modules

Biopython

cElementTree

  • If you're using import xml.etree.cElementTree, also use import xml.etree.ElementTree before that to get it working

ConfigObj

ctypes.com

dpkt

  • dpkt Fixing problems initializing class attributes

ftplib

you may need to try including wsock32.dll or winsock.dll. Sometimes one works, sometimes the other works. Having both might cause problems.

Innosetup

logging module

  • LoggingModule - Getting the %(filename)s format string working in the python logging module.

lxml

  • if missing _elementhpath, either pull whole lxml library in packages=..., or put "from lxml import _elementhpath as _dummy" somewhere in code; in both cases also pull gzip in packages=...

MatPlotLib

  • MatPlotLib - Fixing and including configuration information for this plotting package.

multiprocessing

NumPy

  • If you're getting No scipy-style subpackage 'xxx' found in c:\...\library.zip\numpy. Ignoring, try --skip-archive command line option or pass options = {"py2exe": {"skip_archive":1}} to setup().

  • If you're using numarray and numpy together, be aware that they both have a _sort, and py2exe gets them confused. After py2exe creates the dist directotry, copy numpy/core/_sort.pyd and numarray/sort.pyd to their respective locations in the dist. [This problem is due to a bug in py2exe: it used a single, flat namespace for all .pyd files. This has been fixed in CVS as of 7 Sep 2007.]

  • Numpy 1.4.0 and Py2exe 0.6.9 may have issues compiling to an executable. The executable may run on your computer, but wont run on other machines. You may get and error that says the module cant be found or a DLL load failure referencing numpy files (.pyc,.pyo). The solution to this is to use numpy 1.3.0.

os.popen

  • os.popen If you're getting failures when the CWD is a UNC path like \\host\dirname\...

PIL

  • py2exeAndPIL If you're getting cannot identify image file, read this

  • PILAndFontfiles If you're getting Cannot find font file, read this

protobuf

  • GoogleProtobuf If you're getting The following modules appear to be missing

pubsub

  • Add 'pubsub.*', 'pubsub.core.*', 'pubsub.core.kwargs.*' to include_packages if using the new interface, otherwise add 'pubsub.*', 'pubsub.core.*', 'pubsub.core.arg1.*' when using the old interface.

PyGTK (and Kiwi)

pyodbc

  • PyODBC additional configuration required to include decimal package

PyOpenGL

  • PyOpenGL A hack to get py2exe and PyOpenGL working

PyQt

  • Py2exeAndPyQt If you're getting File "qt.pyc", line 7, in __load Import Error: No module named sip, read this

Python Eggs

  • ExeWithEggs - A recipe for creating an .exe out of eggs

PythonCard

Python ADODB modules

  • ADODB package Modules named adodb_xxx (like adodb_mysql) are not added automatically, must be added explicitly

PyXML

  • Py2exeAndPyXML If you're getting File "xml\sax\saxexts.pyc", line 77, in make_parser; xml.sax._exceptions.SAXReaderNotAvailable: No parsers found, read this.

Quixote

Quixote is a pythonivc toolkit for web pages which allows one to execute ptl files using ihooks. You can distribute your web application with medusa or twisted and hence you can create a web application without IIS or Apache.

I like to distribute my application with py2exe but I can not make py2exe setup script to recognize that x.ptl is a valid python files. Any idea how to do this? - impossible: py2exeAndQuixote HAM20040602

Raven

It seems Raven uses its own function to import modules and cache them so py2exe isn't able to figure out which modules are needed. You need to manually specify them with options={"py2exe": {"includes": ["raven.events", "raven.processors"]}}.

reportlab

SciPy

  • ScipyImportProblems Using py2exe with scipy ends up with missing cephes and __cvs_version__ messages. Here is a fix.

subprocess

Tix

  • TixSetup - Including the Tix DLL and Tcl files to make Tix apps work.

win32com

win32pipe

win32ui

wxPython

zmq


WorkingWithVariousPackagesAndModules (last edited 2012-06-25 15:49:01 by LeeKamentsky)