Lepton on Mac OS 10.5

65 views
Skip to first unread message

shake

unread,
Jul 6, 2009, 10:09:23 PM7/6/09
to General discussion of the Lepton particle engine for Python
Hi all,

I tried this on a fairly new MacBook (Intel) and an old PPC iMac and
got the same error.

I downloaded and installed lepton1.0b1, ran setup.py install, which
created the lepton directory in site-packages.

Here is what I get:

Python 2.5.1 (r251:54863, Feb 6 2009, 19:02:12)
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import lepton
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "lepton/__init__.py", line 6, in <module>
from group import ParticleGroup
ImportError: No module named group

Is lepton dependent on Python 2.6 (that's the only thing I could think
of)? The default install in Mac 10.5 is 2.5.

Thanks in advance and let me know if you need more information.

-CV

Casey Duncan

unread,
Jul 7, 2009, 11:25:31 AM7/7/09
to py-lept...@googlegroups.com
Hello,

It should work fine on 2.5, though Apple's built-in 2.5 is slightly
non-standard. It seems as though the modules did not compile properly.
Try importing it manually from the python prompt:

import lepton.group

I suspect that will fail, which would indicate that things did not
compile right. If that's the case, try:

import lepton
lepton.__path__

And list the contents of the directory returned. What do you see?

-Casey

shake

unread,
Jul 7, 2009, 12:18:00 PM7/7/09
to General discussion of the Lepton particle engine for Python
I thought it was some kind of compiler error as well, but I think this
was *user* error. I tried it this morning on the PPC Mac using a new
terminal session and it worked fine. I was able to run some of the
demos without resorting to any funky sys.path manipulations. I'll try
the Intel Mac tonight. If I have issues over there, I will perform the
steps you reccommend.

FWIW, (and please excuse a novice python question) - I had the
uncompiled lepton still sitting in ~/Downloads which was my current
directory when I went into the interactive python prompt in terminal.
When I type

import lepton

would Python try to import the uncompiled version in ~/Downloads
before looking through sys.path for the module?

(I'll try to duplicate this behavior at home tonight if I have time).

On Jul 7, 11:25 am, Casey Duncan <casey.dun...@gmail.com> wrote:
> Hello,
>
> It should work fine on 2.5, though Apple's built-in 2.5 is slightly
> non-standard. It seems as though the modules did not compile properly.
>  Try importing it manually from the python prompt:
>
> import lepton.group
>
> I suspect that will fail, which would indicate that things did not
> compile right. If that's the case, try:
>
> import lepton
> lepton.__path__
>
> And list the contents of the directory returned. What do you see?
>
> -Casey
>

Casey Duncan

unread,
Jul 7, 2009, 5:32:57 PM7/7/09
to py-lept...@googlegroups.com
On Tue, Jul 7, 2009 at 10:18 AM, shake<cvoll...@gmail.com> wrote:
>
> I thought it was some kind of compiler error as well, but I think this
> was *user* error. I tried it this morning on the PPC Mac using a new
> terminal session and it worked fine. I was able to run some of the
> demos without resorting to any funky sys.path manipulations. I'll try
> the Intel Mac tonight. If I have issues over there, I will perform the
> steps you reccommend.
>
> FWIW, (and please excuse a novice python question) - I had the
> uncompiled lepton still sitting in ~/Downloads which was my current
> directory when I went into the interactive python prompt in terminal.
> When I type
>
> import lepton
>
> would Python try to import the uncompiled version in ~/Downloads
> before looking through sys.path for the module?

yes, it will search there first, I suspect that was your problem before.

-Casey

shake

unread,
Jul 9, 2009, 2:19:39 PM7/9/09
to General discussion of the Lepton particle engine for Python
Doh! That was it. I guess I learned something about python imports the
hard way.
Thanks for your time and patience.

-Chris

On Jul 7, 5:32 pm, Casey Duncan <casey.dun...@gmail.com> wrote:
Reply all
Reply to author
Forward
0 new messages