Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo
Worked fine..Thanks again André. Although, there were other files (as you
predicted) with a similar problem, when I added the straight import and
commented out the existing import that also didn't work. So, I uncommented
the existing import and left the new import and it works. However, there is
still this output message:
The following modules appear to be missing
['Image', '_pykpathsea', '_t1code', 'pyx.graph.axis.linkedaxis',
'pyx.graph.axis.logarithmic']
The output from cx_Freeze is a bit more verbose:
Missing modules:
? Image imported from pyx.mesh
? T1builtinfont imported from pyx.font
? T1font imported from pyx.font
? _pykpathsea imported from pyx.pykpathsea
? _t1code imported from pyx.font.t1file
? pyx.graph.axis.linkedaxis imported from pyx.graph.axis.painter
? pyx.graph.axis.logarithmic imported from pyx.graph.data
? text_pt imported from pyx.font
The .exe ran fine, so it appears these are non-issues for me but they could
be for someone else in the future.
Take Care
Keep Smiling
Rob Morden
Message: 5
Date: Sun, 28 Feb 2010 00:26:12 -0500
From: "Robert Morden" <kazakhts@...>
Subject: [PyX-user] py2exe and pyx bitmap module error
To: <pyx-user@...>
Message-ID: <001301cab836$8abd7fa0$a0387ee0$@ca>
Content-Type: text/plain; charset="us-ascii"
Hello,
I am getting the following error when I try to bundle my
code using py2exe:
File "pyx\__init__.pyc", line 40, in <module>
ImportError: No module named bitmap
My code doesn't write any bitmap files, just .eps files. How can I get
around this issue?
Take Care
Keep Smiling
Rob Morden
-------------- next part --------------
An HTML attachment was scrubbed...
------------------------------
Message: 6
Date: Tue, 2 Mar 2010 14:45:18 +0100
From: Andr? Wobst <wobsta@...>
Subject: Re: [PyX-user] py2exe and pyx bitmap module error
To: pyx-user@...
Message-ID:
<79D47C60-6751-4ECD-9C1C-BE81CFD0C117@...>
Content-Type: text/plain; charset="iso-8859-1"
Hi,
I don't really understand what's going on here (and I have no experience
with py2exe whatsoever). However, as far as I can see we're trying to save
some lines by __import__ in this __init__.py file py2exe does complain. The
file looks like:
import version
__version__ = version.version
__all__ = ["attr", "box", "bitmap", "canvas", "color", "connector", "deco",
"deformer", "document",
"epsfile", "graph", "mesh", "path", "pattern", "pdfextra",
"style", "trafo", "text", "unit"]
# automatically import main modules into pyx namespace
for module in __all__:
__import__(module, globals(), locals(), [])
Instead of the loop with the __import__ expression you should be able to
write regular import statements (like the import version at the top). So
could you try whether it helps to write it as an import statement? Replace
the loop by:
import attr, box, bitmap, canvas, color, connector, deco, deformer,
document, epsfile, graph, mesh, path, pattern, pdfextra, style, trafo, text,
unit
Note to keep the __all__ list intact as it is responsible to make from pyx
import * working as expected.
If it helps you'll find the same issue in a few other __init__.py files
(graph, axis, font). You probably need to fix it there too.
Would be great to hear whether this helps.
Best,
Andr?