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

Chris Weisiger cweisiger at msg.ucsf.edu
Tue Aug 24 00:39:17 CEST 2010


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 <dan at rosspixelworks.com> 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 <module>
>     import mainapp
>   File "/Users/dan/Desktop/editor/mainapp.py", line 2, in <module>
>     import demoframe
>   File "/Users/dan/Desktop/editor/demoframe.py", line 6, in <module>
>     import imeditpanel
>   File "/Users/dan/Desktop/editor/imeditpanel.py", line 12, in <module>
>     import realign
>   File "/Users/dan/Desktop/editor/realign.py", line 8, in <module>
>     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<http://derakon.dyndns.org/%7Echriswei/temp2/editor.tgz>
>
> 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 <dan at rosspixelworks.com> wrote:
>
>>  Hey Chris-
>>
>> Is the source available anywhere? I've made a few wx apps and that sounds
>> familiar.
>>
>> Dan
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pythonmac-sig/attachments/20100823/8daea1e3/attachment.html>


More information about the Pythonmac-SIG mailing list