Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Get the error "NameError: name '_interact_' is not defined" when run sagenb by SageM

Hi, I still want to run sagenb for sagemath 9.1. I follow wiki.sagemath.org/Python3-Switch use the following codes to compile sage 9.1. make configure ./configure --with-python=2 make build Then I run ‘ ./sage -i sagenb’. But I get errors in the notebook:

Traceback (most recent call last): File "<stdin>", line 1, in <module> File "_sage_input_6.py", line 8, in <module> _interact_.SAGE_CELL_ID=1 NameError: name '_interact_' is not defined

I do not know how to debug this problem.

Get the error "NameError: name '_interact_' is not defined" when run sagenb by SageM

Hi, I still want to run sagenb for sagemath 9.1. I follow wiki.sagemath.org/Python3-Switch use the following codes to compile sage 9.1. 9.1.

make configure configure; ./configure --with-python=2 --with-python=2; make build build

Then I run ‘ ./sage -i sagenb’. But I get errors in the notebook:

Traceback (most recent call last): last):

File "<stdin>", line 1, in <module> <module>

File "_sage_input_6.py", line 8, in <module> <module>

_interact_.SAGE_CELL_ID=1

NameError: name '_interact_' is not defined

I do not know how to debug this problem.

Get the error "NameError: name '_interact_' is not defined" when run sagenb by SageM

Hi, I still want to run sagenb for sagemath 9.1. I follow wiki.sagemath.org/Python3-Switch use the following codes to compile sage 9.1.

make configure;   ./configure --with-python=2; make build 

build

Then I run ‘ ./sage -i sagenb’. But I get errors in the notebook:

Traceback (most recent call last):

last): File "<stdin>", line 1, in <module>

<module> File "_sage_input_6.py", line 8, in <module>

<module>

    _interact_.SAGE_CELL_ID=1

NameError: name '_interact_' is not defined

I do defined

This problem may be caused by the codes in sage/local/lib/python2.7/site-packages/sagenb-1.1.3-py2.7.egg/sagenb/notebook/worksheet.py.

   def initialize_sage(self):
            S = self.__sage
            try:
                from . import misc
                cmd = '''import base64
import sagenb.misc.support as _support_
import sagenb.notebook.interact as _interact_ # for setting current cell id
....  '''

          S.execute(cmd)

I think 'cmd' is not know how to debug this problem.be executed. If I put some error code in 'cmd', there were nothing happened.

Get the error "NameError: name '_interact_' is not defined" when run sagenb by SageM

Hi, I still want to run sagenb for sagemath 9.1. I follow wiki.sagemath.org/Python3-Switch use the following codes to compile sage 9.1.

make configure;   ./configure --with-python=2; make build

Then I run ‘ ./sage -i sagenb’. But I get errors in the notebook:

Traceback (most recent call last):

  File "<stdin>", line 1, in <module>

  File "_sage_input_6.py", line 8, in <module>

    _interact_.SAGE_CELL_ID=1

NameError: name '_interact_' is not defined

This problem may be caused by the codes in sage/local/lib/python2.7/site-packages/sagenb-1.1.3-py2.7.egg/sagenb/notebook/worksheet.py.

   def initialize_sage(self):
            S = self.__sage
            try:
                from . import misc
                cmd = '''import base64
import sagenb.misc.support as _support_
import sagenb.notebook.interact as _interact_ # for setting current cell id
....  '''

          S.execute(cmd)

I think 'cmd' is not be executed. If I put some error code in 'cmd', there were nothing happened.