Skip to content

Working with Various Packages and Modules

Biopython

  • Biopython Fixing problems with importing Bio.Config files from library.zip

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

  • Logging - 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

  • PIL If you're getting cannot identify image file, read this
  • PIL fonts If you're getting Cannot find font file, read this

protobuf

  • Protobuf 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)

  • PyGTK A recipe for py2exe and PyGTK

pyodbc

  • pyodbc additional configuration required to include decimal package

PyOpenGL

PyQt

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

Python Eggs

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

PythonCard

  • PythonCard Getting pythoncard to work by editing setup.py

Python ADODB modules

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

PyXML

  • PyXML 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: Quixote 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

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

subprocess

  • Subprocess - Getting subprocess module to work with py2exe.

Tix

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

win32com

win32pipe

win32ui

  • win32ui Using win32ui with py2exe 0.6 and python 2.6

wxPython

  • wxPython If you're getting wxObjectPtr not found, read this

zmq

  • ZeroMQ If py2exe cant find libzmq.dll

CategoryCategory