[Pythonmac-SIG] [py2app] No module named os

Dan Ross dan at rosspixelworks.com
Tue Aug 24 01:55:30 CEST 2010



Happy to try. 

Glad you got it sorted out. 

On Mon, 23 Aug 2010
15:39:17 -0700, Chris Weisiger  wrote:  

That's odd. I get the "couldn't
load module(s): P" but Y loads fine. These are legacy modules from a
previous developer, and I generally try to avoid dealing with them. "Y"
refers to either "usefulX.py" or "usefulX2.py", I'm not certain which. Both
are in the Priithon directory. (Note that they aren't imported as "X"
because that's the letter used for one of the modules the original
developer named after himself...fortunately not in this particular
program)

However, I was able to get a standalone version working. I
started poking at the __boot__.py and site.py files in the generated app,
and somehow that made the failures to import fundamental libraries like os
and traceback go away. My only guess is that maybe py2app was including the
.pyc files that had been generated on my local computer? Anyway, after that
I got failures to import numpy.Tester, which are I think due to a version
mismatch on my end. Easily fixed, though, as that module's not actually
needed; I just commented out the imports. 

Thanks for being willing to
take a look! I think maybe I just needed a weekend of not thinking about it
so I could come back to the problem fresh. :)

-Chris

 On Mon, Aug 23,
2010 at 3:26 PM, Dan Ross  wrote:
  Hmmm.....

 I'm getting this when I try
to run it from Terminal:

 dan-rosss-macbook-pro:editor dan$ python
editor.py
 * couldn't load module(s): Y P 
 Traceback (most recent call
last): File "editor.py", line 7, in 
 import mainapp
 File
"/Users/dan/Desktop/editor/mainapp.py", line 2, in 
 import demoframe
 File
"/Users/dan/Desktop/editor/demoframe.py", line 6, in 
 import imeditpanel

File "/Users/dan/Desktop/editor/imeditpanel.py", line 12, in 
 import
realign
 File "/Users/dan/Desktop/editor/realign.py", line 8, in 
 from
Priithon.all import F, Y
 ImportError: cannot import name Y

 Can you tell
me what's supposed to be happening?

 On 8/23/10 10:18 AM, Chris Weisiger
wrote: I've put the program online
here:

http://derakon.dyndns.org/~chriswei/temp2/editor.tgz [2]

 When run,
it should show a large blank window with four icons in the upper-left
corner. 

 Thanks for being willing to take a look.

 -Chris

 On Sat, Aug
21, 2010 at 6:12 AM, Dan Ross  wrote:
  Hey Chris-

 Is the source
available anywhere? I've made a few wx apps and that sounds familiar.


Dan

 

Links:
------
[1] mailto:dan at rosspixelworks.com
[2]
http://derakon.dyndns.org/%7Echriswei/temp2/editor.tgz
[3]
mailto:dan at rosspixelworks.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pythonmac-sig/attachments/20100823/f0183768/attachment-0001.html>


More information about the Pythonmac-SIG mailing list