On Nov 25, 2007 10:29 AM, Timothy Clemans <[EMAIL PROTECTED]> wrote: > > Hi, > > I started writing an external library that uses Sage and I meditatly ran into: > > >>> import sage.rings.integer > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > ImportError: libcsage.so: cannot open shared object file: No such file > or directory > >>> import sage.rings.arith > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > File > "/home/timothy/sage-2.8.13/local/lib/python2.5/site-packages/sage/rings/arith.py", > line 14, in <module> > import sage.misc.misc as misc > File > "/home/timothy/sage-2.8.13/local/lib/python2.5/site-packages/sage/misc/misc.py", > line 28, in <module> > SAGE_ROOT = os.environ["SAGE_ROOT"] > File "/home/timothy/sage-2.8.13/local/lib/python2.5/UserDict.py", > line 22, in __getitem__ > raise KeyError(key) > KeyError: 'SAGE_ROOT' > > I'm using Ubuntu 7.10 64 on AMD 64X2. I'm using Sage 2.8.13 built from > source upgraded to 2.8.14. I tried the Ubuntu 32 Sage binary before > building from source. > > When I use Sage to run: > > [simport.py] ------ > from sage.rings.integer import Integer > > I get > > ------------------------------------------------------------ > Unhandled SIGSEGV: A segmentation fault occured in SAGE. > This probably occured because a *compiled* component > of SAGE has a bug in it (typically accessing invalid memory) > or is not properly wrapped with _sig_on, _sig_off. > You might want to run SAGE under gdb with 'sage -gdb' to debug this. > SAGE will now terminate (sorry). > ------------------------------------------------------------ > > sage: Error running simport.py using Python > > In my library I won't want to have to import all of Sage just to be > able to use Integer, factor, etc. >
You *have* to do import sage.all before doing any other imports of mathematical things from the sage library. Full stop. It should not and cannot work otherwise. -- William --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~----------~----~----~----~------~----~------~--~---
