Hi Oscar, On Tue, Aug 18, 2009 at 3:39 AM, Oscar Lazo<geometricame...@hotmail.com> wrote: > Hello, > > I've compiled sage 4.1.1, and it seems to work nicely. However, I can't run > *.sage scripts from the command line. > > I've made a file named test.sage with the following content: > > print "Hello World" > print 8^3 > > and run "sage test.sage" > > and get the following error: > 'import site' failed; use -v for traceback > Traceback (most recent call last): > File "demo.py", line 2, in <module> > from sage.all_cmdline import * # import sage library > ImportError: No module named sage.all_cmdline
This is strange indeed. Say my current directory is this [mv...@sage mvngu]$ pwd /scratch/mvngu and I have installed Sage locally: [mv...@sage mvngu]$ cd build/sage-4.1.1/ [mv...@sage sage-4.1.1]$ pwd /scratch/mvngu/build/sage-4.1.1 [mv...@sage sage-4.1.1]$ cd ../.. I have a Sage script "test.sage" with the following content as above: [mv...@sage mvngu]$ cat test.sage print "Hello World" print 8^3 Then I would run that script with my local Sage installation: [mv...@sage mvngu]$ build/sage-4.1.1/sage test.sage Hello World 512 As a guess, I think you have put the location of Sage in your PATH or you have installed Sage system-wide. -- Regards Minh Van Nguyen --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---