Ask Your Question
0

installing from conda-forge

asked 2020-06-12 08:24:54 +0100

Shaolinux gravatar image

updated 2020-06-12 16:23:47 +0100

slelievre gravatar image

I have now used the info on the conda page of Sage manual in both variants proposed there (1. via mamba and 2. via conda with Python=3.7). In both cases the install seems to be successful but when activating the sage environment and entering it, I tried to follow the instructions in help() and build the tutorial, manual. etc. via the prescribed in the help() line, I ultimately get

sage: tutorial()
---------------------------------------------------------------------------
OSError                                   Traceback (most recent call last)
<ipython-input-2-c50b110aacc5> in <module>()
----> 1 tutorial()

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

/home/lubomir/anaconda3/envs/sage/lib/python3.7/site-packages/sage/misc/sagedoc.py in tutorial(self)
   1538             sage: tutorial()  # indirect doctest, not tested
   1539         """
-> 1540         self._open("tutorial")
   1541 
   1542     def reference(self):

/home/lubomir/anaconda3/envs/sage/lib/python3.7/site-packages/sage/misc/sagedoc.py in _open(self, name, testing)
   1519         if not os.path.exists(path):
   1520             raise OSError("""The document '{0}' does not exist.  Please build it
-> 1521 with 'sage -docbuild {0} html --mathjax' and try again.""".format(name))
   1522 
   1523         if testing:

OSError: The document 'tutorial' does not exist.  Please build it
with 'sage -docbuild tutorial html --mathjax' and try again.
sage: sage -docbuild tutorial html --mathjax
  File "<ipython-input-3-aab87ab7e211>", line 1
    sage -docbuild tutorial html --mathjax
                          ^
SyntaxError: invalid syntax

sage:

What am I doing wrongly?

edit retag flag offensive close merge delete

Comments

It looks like the documentation hasn't been built. What did you do to try build it?

John Palmieri gravatar imageJohn Palmieri ( 2020-06-12 18:25:35 +0100 )edit

I just followed the instructions in the conda page in the manual. Installation was smooth, without any problems. Then, I entered the new sage environment after activating it. Then typed 'ḧelp()' and then typed 'tutorial()' according to the instruction in 'ḧelp()'. The rest is given in the text above.

Shaolinux gravatar imageShaolinux ( 2020-06-12 23:29:05 +0100 )edit

3 Answers

Sort by » oldest newest most voted
1

answered 2020-06-15 04:23:58 +0100

isuruf gravatar image

We don't have the docs built for the sage package in conda-forge yet. Help is welcome on this.

edit flag offensive delete link more
0

answered 2020-06-13 03:11:41 +0100

Shaolinux gravatar image

updated 2020-06-13 03:15:01 +0100

It seems that no one of the moderators is willing to go through the above simple chunk of text from the sage environment. This is why I am going to simplify the question (it can be seen easily from the above text that the question essentially remains the same).

Why after typing in the sage environment, according to the instruction in help()

sage -docbuild tutorial html --mathjax

the result is SyntaxError: invalid syntax

instead of the expected result: building the document 'tutorial'.

???

It seems to me that something at the repository at conda-forge is incomplete for the case of Python 3.7.

edit flag offensive delete link more
0

answered 2020-06-13 20:22:44 +0100

updated 2020-06-13 20:22:59 +0100

sage --docbuild tutorial html --mathjax must be run from the Terminal (bash, zsh, etc.) prompt, not from within Sage.

edit flag offensive delete link more

Comments

Thank you for your response. There is some progress, but we are not done yet. Here is what I get after running from bash on the terminal:

(base) lubomir@lubomir-HP-ZBook-17-G6:~$ echo $SHELL

/bin/bash

(base) lubomir@lubomir-HP-ZBook-17-G6:~$ sage --docbuild tutorial html --mathjax

/home/lubomir/anaconda3/bin/python: Error while finding module specification for 'sage_setup.docbuild' (ModuleNotFoundError: No module named 'sage_setup')

I'd like to add also that in the text in 'help()' in sage prompt ON THE TERMINAL, there is something which is unclear to me at this point: while I am reading help() in the terminal (in sage prompt) the expression used there is: '... to view the Sage tutorial IN YOUR WEB BROWSER...'. I am expecting to read it in my terminal not in a web browser. ???

Shaolinux gravatar imageShaolinux ( 2020-06-14 03:21:57 +0100 )edit

If you run tutorial()from Sage running in the terminal, it should automatically open up a browser window showing the document (like visiting https://doc.sagemath.org/html/en/tuto..., but your own local version). (This is assuming that the documentation has been built successfully.)

John Palmieri gravatar imageJohn Palmieri ( 2020-06-15 00:22:46 +0100 )edit

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: 2020-06-12 08:24:54 +0100

Seen: 764 times

Last updated: Jun 15 '20