On Fri, Mar 5, 2010 at 12:08 PM, Mike Hansen <[email protected]> wrote:
> On Fri, Mar 5, 2010 at 8:33 AM, Robert Miller <[email protected]> wrote:
>> [rlm-book sage-4.3.4.alpha0/devel/sage-main]$ ../../sage -notebook
>> ImportError: No module named randstate
>> [rlm-book sage-4.3.4.alpha0/devel/sage-main]$ cd ../..
>> [rlm-book sage-4.3.4.alpha0]$ ./sage -notebook
>> }}}
>
> This is a pretty common issue for a lot of things.  The current
> directory gets added to sys.path by default and that takes precedence
> over other paths.  When you try to import sage from that location,
> then it looks in the current directory and sees a sage/ directory that
> contains an __init__.py.  However, none of the built extension modules
> are in that tree.  sage.misc.randstate is the first extension module
> that tries to get loaded and fails as you see above.
>
> --Mike
>

Yep, that's exactly what happened.  I've been bitten by this a few times too.
Perhaps somebody could actually write some code (in
local/bin/sage-sage, say), which
would print a big warning if Sage is started from
$SAGE_ROOT/devel/sage.  It might be tricky to actually write such code
that works robustly though...

William

-- 
To post to this group, send an email to [email protected]
To unsubscribe from this group, send an email to 
[email protected]
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to