Ask Your Question
1

Sage Notebook is not working

asked 2016-01-25 02:39:23 +0100

this post is marked as community wiki

This post is a wiki. Anyone with karma >750 is welcome to improve it.

I just installed Sage for the first time. I downloaded the app version 7.0 for apple os x version 10.11.4.

When I open the application for the first time, it launches the notebook in chrome Version 48.0.2564.82 beta (64-bit).

I just entered 2+2 and this was the error that I got.

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "_sage_input_2.py", line 10, in <module>
    exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("Misy"),globals())+"\\n"); execfile(os.path.abspath("___code___.py"))
  File "", line 1, in <module>

  File "/private/var/folders/kq/pdkzk0sd28vf__cjjm_bqlxh0000gn/T/tmp8hlaTE/___code___.py", line 2, in <module>
    _sage_const_2 = Integer(2)
NameError: name 'Integer' is not defined
edit retag flag offensive close merge delete

Comments

This is bad; I've asked about what could have caused this at https://groups.google.com/forum/#!top... There shouldn't have been any change that caused sage.all not to be imported, which is what your error indicates happened (that it's running pure Python). What does the little drop-down menu of languages in the notebook say at start - sage, python, or something else?

kcrisman gravatar imagekcrisman ( 2016-01-26 18:25:06 +0100 )edit

Yes, sage from sage-7.0-osx-10.11.2-x86_64.app.dmg as well as sage from the sage-7.0-osx-10.11.2-x86_64.dmg do not import "sage.all". They return an import error on cliquer.so even though the library exists. I have built sage from the sage-7.0.tar.gz sources, and this sage 7.0 does work under Mac OS X 10.11.2-10.11.3, but you have to be patient because the build takes several hours. Also, another workaround would be to load the sage app from sage-6.10-osx-10.11.2-x86_64.app.dmg. This sage app works properly under 10.11.2-10.11.4.

nick gravatar imagenick ( 2016-01-27 00:09:24 +0100 )edit

A way for all here to test this is to try running Sage in the terminal and see what happens. It would be good to find out if this is a notebook problem or instead the problem of using a Sage built on a newer machine on an older processor.

kcrisman gravatar imagekcrisman ( 2016-01-27 01:43:56 +0100 )edit

The sage I ran from sage-7.0-ox-10.11.2-x86_64.dmg I ran from the terminal. It still failed. But if I build sage from the sources, and then run it from the terminal, it works including the notebook(). I'm running on Haswell core i7 processors, nearly the most recent ones available (unless you have a Skylake processor).

nick gravatar imagenick ( 2016-01-27 02:02:39 +0100 )edit

There may be other problems with sage 7.0, as I'm having problems running some old Monte Carlo codes that work under sage 6.10 (just checked them again), but that never finish under sage 7.0. They appear to "hang" with no errors returned. Not only that, but simple arithmetic and conditionals that execute upon first attempt will "hang" when attempting to re-execute them, even after interrupting and restarting the worksheet.

nick gravatar imagenick ( 2016-01-27 16:55:37 +0100 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-01-26 13:44:22 +0100

mnr gravatar image

I get the same error (I tried 1 + 1). It seems that everything is undefined, also objects like Matrix. If you type somewhere Integer = int. Then sage will get 1+1 and output 2, but then if you try to make an object like a Matrix, it will still say that Matrix is not defined.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2016-01-25 02:39:23 +0100

Seen: 1,617 times

Last updated: Jan 25 '16