instructions for installing sage do not work

13 views
Skip to first unread message

nsauer

unread,
Mar 8, 2009, 9:23:44 PM3/8/09
to sage-support
Hi;

Operating system: Mac OS X Version: 10.5.6
I downloaded the dmg, opened it moved sage into my Applications folder
and double clicked.

The terminal opened as follows:
Last login: Sun Mar 8 16:23:08 on console
/Applications/sage/sage ; exit;
You have mail.
Laptop-3:~ test$ /Applications/sage/sage ; exit;
----------------------------------------------------------------------
| Sage Version 3.2.3, Release Date: 2009-01-05 |
| Type notebook() for the GUI, and license() for information. |
----------------------------------------------------------------------
sage:

The instructions say:
4) Select to run it with "Terminal":
Choose Applications, then select "All Applications" in the
"Enable:" drop down. Change the "Applications" drop down
to "Utilities". On the left, scroll and select "Terminal".
Click "Open", then in the next dialog select "Update".

There is nowhere any window or prompt in which I can choose
Applications or follow the instructions above.

Also: I intend to use sage in TeXshop with LaTeX. When I try to follow
the instructions there and run the supplied
tutorial file, I get the error message that sage does not work.


kcrisman

unread,
Mar 9, 2009, 9:38:03 AM3/9/09
to sage-support
>
> The terminal opened as follows:
> Last login: Sun Mar  8 16:23:08 on console
> /Applications/sage/sage ; exit;
> You have mail.
> Laptop-3:~ test$ /Applications/sage/sage ; exit;
> ----------------------------------------------------------------------
> | Sage Version 3.2.3, Release Date: 2009-01-05                       |
> | Type notebook() for the GUI, and license() for information.        |
> ----------------------------------------------------------------------
> sage:

This looks great - type in

2+2

then Enter, and hopefully you will get

4

>
> The instructions say:
> 4) Select to run it with "Terminal":
>      Choose Applications, then select "All Applications" in the
>      "Enable:" drop down.  Change the "Applications" drop down
>      to "Utilities".  On the left, scroll and select "Terminal".
>      Click "Open", then in the next dialog select "Update".

Apparently your Mac already knows what to do with Sage, or perhaps our
dmg builder already made the double-clickable application available
for download (mabshoff, did you do that with 3.2.3?).

Anyway, if you can enter commands, that sounds good. As it says, type
notebook() for the graphical user interface.

>
> Also: I intend to use sage in TeXshop with LaTeX. When I try to follow
> the instructions there and run the supplied
> tutorial file, I get the error message that sage does not work.

There are several threads about this on the sage-support list right
now; probably more details about the error message and the exact steps
you followed would help those who are experts in this to give you a
helpful answer.

Good luck,
- kcrisman

nsauer

unread,
Mar 9, 2009, 1:03:22 PM3/9/09
to sage-support
Thanks for your help, everything works great now.
How do I write matrices inside [ ] instead of ( ) ?

kcrisman

unread,
Mar 9, 2009, 7:47:26 PM3/9/09
to sage-support


On Mar 9, 1:03 pm, nsauer <nsa...@math.ucalgary.ca> wrote:
> Thanks for your help, everything works great now.

Great!

> How do I write matrices inside [ ] instead of ( )  ?

I'm not sure - can you be more specific about what command you are
trying, what output you are getting, and what output you desire?

- kcrisman

nsauer

unread,
Mar 10, 2009, 12:06:31 PM3/10/09
to sage-support
Thanks again for your help.

The textbook I am teaching linear algebra from prints matrices
with brackets as delimeters. [ ]. Hence when I set a test and
write solutions with LateX I wish to use the same notation for
matrices as used in the text.
But just using the standard way to include matrices from
sage into LateX produces matrices inside ( ) delimters.
\sage{matrix([[1, 2, 3], [4, 5, 6], [7, 8, 9]])^3}

I checked the LateX stylefile for including sage but
notation for shape of matrices is not defined there.

nsauer

Jason Grout

unread,
Mar 10, 2009, 2:57:19 PM3/10/09
to sage-s...@googlegroups.com
nsauer wrote:
> Thanks again for your help.
>
> The textbook I am teaching linear algebra from prints matrices
> with brackets as delimeters. [ ]. Hence when I set a test and
> write solutions with LateX I wish to use the same notation for
> matrices as used in the text.
> But just using the standard way to include matrices from
> sage into LateX produces matrices inside ( ) delimters.
> \sage{matrix([[1, 2, 3], [4, 5, 6], [7, 8, 9]])^3}
>
> I checked the LateX stylefile for including sage but
> notation for shape of matrices is not defined there.
>

It looks like this is done in the last line of the _latex_ function in
sage/devel/sage/sage/matrix0.pyx. How comfortable are you with changing
Sage code?

I agree that this should be an option. Also, the delimiters for vectors
should be an option.

William Stein

unread,
Mar 10, 2009, 3:34:32 PM3/10/09
to sage-s...@googlegroups.com

+1.

How about adding a function to matrix0.pyx that sets a global variable
in that file to the left and right delimiters for matrices?

sage.matrix.matrix0.set_latex_delimiters('[',']')

would set them. That's minimally intrusive. Later on somebody could
come up with some grand scheme for customizing latex output, but
please don't until there are a few more use cases.

William

nsauer

unread,
Mar 10, 2009, 4:00:13 PM3/10/09
to sage-support
Thanks for your reply;

As I am completely new to sage I do not know how to
perform the indicated change. I looked at the file
sage/devel/sage/sage/matrix0.pyx
but could not figure out how and where to add
the function sage.matrix.matrix0.set_latex_delimiters('[',']')

Norbert

John H Palmieri

unread,
Mar 10, 2009, 4:28:10 PM3/10/09
to sage-support


On Mar 10, 1:00 pm, nsauer <nsa...@math.ucalgary.ca> wrote:
> Thanks for your reply;
>
> As I am completely new to sage I do not know how to
> perform the indicated change. I looked at the file
> sage/devel/sage/sage/matrix0.pyx
> but could not figure out how and where to add
> the function sage.matrix.matrix0.set_latex_delimiters('[',']')

If you want to make a change just for your own personal use (that is,
switching to square brackets, not implementing set_latex_delimiters),
then in the line

return "\\left(\\begin{array}{%s}\n"%format + s + "\n\\end
{array}\\right)"

change '\\left(' to '\\left[' and similarly change '\\right)' to '\
\right]'. Run 'sage -b' to recompile the changed file. If you're
going to be using 0 x n matrices, or n x 0 matrices, then you should
also change the parentheses to brackets in this line (36 lines
earlier):

return "()"

--
John

John H Palmieri

unread,
Mar 10, 2009, 5:27:52 PM3/10/09
to sage-support
On Mar 10, 12:34 pm, William Stein <wst...@gmail.com> wrote:
> On Tue, Mar 10, 2009 at 11:57 AM, Jason Grout

[snip]

> > I agree that this should be an option.  Also, the delimiters for vectors
> > should be an option.
>
> +1.
>
> How about adding a function to matrix0.pyx that sets a global variable
> in that file to the left and right delimiters for matrices?
>
> sage.matrix.matrix0.set_latex_delimiters('[',']')
>
> would set them.  That's minimally intrusive.  Later on somebody could
> come up with some grand scheme for customizing latex output, but
> please don't until there are a few more use cases.

<http://trac.sagemath.org/sage_trac/ticket/5474>

(This only does matrix delimiters because I apparently can't read, so
I missed Jason's suggestion about vectors...)

John

William Stein

unread,
Mar 10, 2009, 6:38:14 PM3/10/09
to sage-s...@googlegroups.com

Positive review!

nsauer

unread,
Mar 10, 2009, 11:52:31 PM3/10/09
to sage-support
Thanks for the help. I made the changes
but failed to recompile. Here is what I did:
(test is my home name) where is this sage binary?

Laptop-3:~ test$ sage -b
-bash: sage: command not found

Laptop-3:/ test$ sage -b
-bash: sage: command not found

Laptop-3:sage test$ sage -b
-bash: sage: command not found

sage: sage -b
---------------------------------------------------------------------------
NameError Traceback (most recent call
last)

/Users/test/<ipython console> in <module>()

NameError: name 'b' is not defined
sage:

Norbert

Robert Bradshaw

unread,
Mar 10, 2009, 11:58:38 PM3/10/09
to sage-s...@googlegroups.com
How are you starting up Sage? If you're starting up sage via

/path/into/folder/sage

then you'll have to do

/path/into/folder/sage -b

nsauer

unread,
Mar 11, 2009, 11:57:19 AM3/11/09
to sage-support
Thanks for replying;

I start sage by double clicking on the name "sage" in the finder.
It is in /Applications/sage/
This file sage, in /Applications/sage/ is a Unix Executible File.
Even so, if in the terminal I change the directory to
/Applications/sage/ and type sage
I get the return that
-bash: sage: command not found

I also looked at all the other usual places to find an executible
"sage" file, but there does not seem to be one.

I am not Unix experienced enough to sort this out.

Thanks again,

Norbert



On Mar 10, 9:58 pm, Robert Bradshaw <rober...@math.washington.edu>
wrote:

Robert Bradshaw

unread,
Mar 11, 2009, 6:28:12 PM3/11/09
to sage-s...@googlegroups.com
On Mar 11, 2009, at 8:57 AM, nsauer wrote:

>
> Thanks for replying;
>
> I start sage by double clicking on the name "sage" in the finder.
> It is in /Applications/sage/
> This file sage, in /Applications/sage/ is a Unix Executible File.
> Even so, if in the terminal I change the directory to
> /Applications/sage/ and type sage
> I get the return that
> -bash: sage: command not found

OK, what you need to do is cd into the directory then type

./sage

or

./sage -b

to build the changes. By default, bash looks for commands in a
specified set of directories (the PATH environment variable) but if
you specify a path (./sage means the "sage" file in the current
directory) it will forgo the lookup and use that one.
Reply all
Reply to author
Forward
0 new messages