On Oct 17, 2007, at 3:40 AM, Steffen wrote:

>
> Hi,
>
> I am still struggling to run python and also sage scripts in the bash.
> My way was to write the bash script /usr/bin/sage which calls
> $SAGE_ROOT/./sage. This worked fine to start sage. Unfortunatelly
> trying to run a sage script with #!/usr/bin/env sage or a python
> script with #!/usr/bin/env sage -python I still get the error:
>
> /usr/bin/env: sage -python: file or directory not found
>
> I tried to use a symbolic link as mentioned by Justin, but then I am
> asked to run make what I did of course.

I think this is due to an untouched "sage" command in your $SAGE_ROOT  
directory.  I'm puzzled by the error message though ("sage -python:  
file ...").  What shell are you using?

You should edit your sage, and change the definition of SAGE_ROOT to  
be the actual install directory.  From the factory, it has the  
definition SAGE_ROOT=.....; when run, the command detects that this  
variable has not been changed and gives you the warning message you saw.

> I am also confused by the fact
> that /usr/bin/env is a script and not a directory. As mentioned above
> I am runnig a Suse10.0 and I have updated with sage -upgrade from
> 2.8.6 to 2.8.7.

This command sets up the environment variables for subsequent usage  
of the sage command and its friends.  Among other things, it alters  
your PATH and 'library' search variables so that the SAGE variants  
are used in preference to the system-provided ones.

The reason my suggestion yesterday works for me, and not for you, is  
probably because of this.  I will guess that you are getting the  
complaint above because you don't have a copy of sage in your default  
search path.

To get around some of this, I have a shell script called 'sage',  
which invokes the actual sage script, in my personal "~/bin" directory.

Justin

--
Justin C. Walker, Curmudgeon at Large
Institute for the Absorption of Federal Funds
-----------
I'm beginning to like the cut of his jibberish.
-----------




--~--~---------~--~----~------------~-------~--~----~
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-forum
URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/
-~----------~----~----~----~------~----~------~--~---

Reply via email to