Jupyter nootbook not work

59 views
Skip to first unread message

Szabolcs Sződi

unread,
Dec 29, 2019, 6:47:30 AM12/29/19
to sage-support
Hi dear Somebody!

 I wrote "sage -n jupyter" comman on Jupyler nootbook interface, but not working. 

This is the answer:

 File "<ipython-input-1-2ee9f42db016>", line 1
    sage -n jupyter
                  ^
SyntaxError: invalid syntax

Please, help. Thank you. Kugli

Jan Groenewald

unread,
Dec 29, 2019, 7:11:19 AM12/29/19
to sage-support
Hi

On Sun, 29 Dec 2019 at 13:47, Szabolcs Sződi <kugli...@gmail.com> wrote:
Hi dear Somebody!

 I wrote "sage -n jupyter" comman on Jupyler nootbook interface, but not working. 

This is the answer:

 File "<ipython-input-1-2ee9f42db016>", line 1
    sage -n jupyter
                  ^
SyntaxError: invalid syntax

You should not type that in a sage shell. In a terminal you could type that

user@host:~$ sage -n jupyter

but in a sage shell, you just want to type notebook() :

0 user@host:~$sage
┌────────────────────────────────────────────────────────────────────┐
│ SageMath version 8.6, Release Date: 2019-01-15                     │
│ Using Python 2.7.16. Type "help()" for help.                       │
└────────────────────────────────────────────────────────────────────┘
sage: sage -n jupyter

  File "<ipython-input-1-2ee9f42db016>", line 1
    sage -n jupyter
                  ^
SyntaxError: invalid syntax

sage: notebook()
('The notebook files are stored in:', 'sage_notebook.sagenb')
┌────────────────────────────────────────────────┐
│                                                │
│ Open your web browser to http://localhost:8080
│                                                │
└────────────────────────────────────────────────┘
Executing twistd  --pidfile="sage_notebook.sagenb/sagenb.pid" -ny "sage_notebook.sagenb/twistedconf.tac"
...

Regards,
Jan

--
  .~.
  /V\     Jan Groenewald
 /( )\    www.aims.ac.za
 ^^-^^ 

Szabolcs Sződi

unread,
Dec 29, 2019, 8:54:42 AM12/29/19
to sage-s...@googlegroups.com
Thank you Jan! 

Your answer is helpful, but not me. I'm not programmer only a user. I worked with maple, but SageManifold is seem better. I tried the next ones:
 1. open SageMath
2. open SageMath Shell
3. wrote Jupyter terminal: "user@host:~$ sage -n jupyter" (user? my name? need Jupyter log in? GitHub name?
4. wrote in Shell "0 user@host:~$sage"

I registered to GitHub, installed Anaconda...nothing.

There is something simply step by step instruction for simply, ordinary mortals? Couldn't find anything.

Thanks.



--
You received this message because you are subscribed to the Google Groups "sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-support...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sage-support/CAAg%3Dp_0VBVBGA2GKkevFqxPNE%2BiwrSyWrNy1fi-A3Owh9iqGTA%40mail.gmail.com.

Jan Groenewald

unread,
Dec 29, 2019, 9:26:13 AM12/29/19
to sage-support
Hi

On Sun, 29 Dec 2019 at 15:54, Szabolcs Sződi <kugli...@gmail.com> wrote:
There is something simply step by step instruction for simply, ordinary mortals? Couldn't find anything.

In SageMath Cell type

notebook()

Regards,
Jan

Szabolcs Sződi

unread,
Dec 29, 2019, 9:59:31 AM12/29/19
to sage-support
Thank you, Jan, I'll use CoCalc.

Emmanuel Charpentier

unread,
Dec 31, 2019, 3:33:03 AM12/31/19
to sage-support
Dear Jan;


Le dimanche 29 décembre 2019 15:26:13 UTC+1, Jan Groenewald a écrit :
Hi

On Sun, 29 Dec 2019 at 15:54, Szabolcs Sződi <kugli...@gmail.com> wrote:
There is something simply step by step instruction for simply, ordinary mortals? Couldn't find anything.

In SageMath Cell type

notebook()

Didn't wokfor me : Dagecell's interpreter complains it cant find the (pld) (deprecated)Sage notebook:

---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-1-b5959bb24428> in <module>()
----> 1 notebook()

/home/sc_serv/sage/local/lib/python3.7/site-packages/sage/misc/lazy_import.pyx in sage.misc.lazy_import.LazyImport.__call__ (build/cythonized/sage/misc/lazy_import.c:3684)()
    351             True
    352         """
--> 353         return self.get_object()(*args, **kwds)
    354 
    355     def __repr__(self):

/home/sc_serv/sage/local/lib/python3.7/site-packages/sage/misc/lazy_import.pyx in sage.misc.lazy_import.LazyImport.get_object (build/cythonized/sage/misc/lazy_import.c:2347)()
    186         if likely(self._object is not None):
    187             return self._object
--> 188         return self._get_object()
    189 
    190     cpdef _get_object(self):

/home/sc_serv/sage/local/lib/python3.7/site-packages/sage/misc/lazy_import.pyx in sage.misc.lazy_import.LazyImport._get_object (build/cythonized/sage/misc/lazy_import.c:2586)()
    218         elif self._at_startup and not startup_guard:
    219             print('Option ``at_startup=True`` for lazy import {0} not needed anymore'.format(self._name))
--> 220         self._object = getattr(__import__(self._module, {}, {}, [self._name]), self._name)
    221         name = self._as_name
    222         if self._deprecation is not None:

ModuleNotFoundError: No module named 'sagenb'
 

Aren't we supposed to tell it (how ?) to use Jupyter ?
Reply all
Reply to author
Forward
0 new messages