Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

why ? help does not work for me?

I installed SageMath version 8.3.beta5 on Linux Manjaro 2 days ago first time using its package manager (it build sage, took loooong time).

But for some reason, I can't use the ? help. As in sin? or anything. It gives an error

           ImportError: No module named sphinx.application

For example

sage: sin?
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-24-f06d370d3a79> in <module>()
----> 1 get_ipython().magic(u'pinfo sin')

/usr/lib/python2.7/site-packages/IPython/core/interactiveshell.pyc in magic(self, arg_s)
   2158         magic_name, _, magic_arg_s = arg_s.partition(' ')
   2159         magic_name = magic_name.lstrip(prefilter.ESC_MAGIC)
-> 2160         return self.run_line_magic(magic_name, magic_arg_s)
   2161 
   2162     #-------------------------------------------------------------------------

/usr/lib/python2.7/site-packages/IPython/core/interactiveshell.pyc in run_line_magic(self, magic_name, line)
   2079                 kwargs['local_ns'] = sys._getframe(stack_depth).f_locals
   2080             with self.builtin_trap:
-> 2081                 result = fn(*args,**kwargs)
   2082             return result
   2083 

<decorator-gen-74> in pinfo(self, parameter_s, namespaces)

/usr/lib/python2.7/site-packages/IPython/core/magic.pyc in <lambda>(f, *a, **k)
    186     # but it's overkill for just that one bit of state.
    187     def magic_deco(arg):
--> 188         call = lambda f, *a, **k: f(*a, **k)
    189 
    190         if callable(arg):

/usr/lib/python2.7/site-packages/IPython/core/magics/namespace.pyc in pinfo(self, parameter_s, namespaces)
     59         else:
     60             self.shell._inspect('pinfo', oname, detail_level=detail_level,
---> 61                                 namespaces=namespaces)
     62 
     63     @line_magic

/usr/lib/python2.7/site-packages/IPython/core/interactiveshell.pyc in _inspect(self, meth, oname, namespaces, **kw)
   1534             elif meth == 'pinfo':
   1535                 pmethod(info.obj, oname, formatter, info, 
-> 1536                         enable_html_pager=self.enable_html_pager, **kw)
   1537             else:
   1538                 pmethod(info.obj, oname)

/usr/lib/python2.7/site-packages/IPython/core/oinspect.pyc in pinfo(self, obj, oname, formatter, info, detail_level, enable_html_pager)
    713         - detail_level: if set to 1, more information is given.
    714         """
--> 715         info = self._get_info(obj, oname, formatter, info, detail_level)
    716         if not enable_html_pager:
    717             del info['text/html']

/usr/lib/python2.7/site-packages/IPython/core/oinspect.pyc in _get_info(self, obj, oname, formatter, info, detail_level)
    614         """Retrieve an info dict and format it."""
    615 
--> 616         info = self._info(obj, oname=oname, info=info, detail_level=detail_level)
    617 
    618         _mime = {

/usr/lib/python2.7/site-packages/IPython/core/oinspect.pyc in _info(self, obj, oname, info, detail_level)
    763                     ds += "\nDocstring:\n" + obj.__doc__
    764         else:
--> 765             ds = getdoc(obj)
    766             if ds is None:
    767                 ds = '<no docstring>'

/usr/lib/python2.7/site-packages/sage/misc/lazy_import.pyx in sage.misc.lazy_import.LazyImport.__call__ (build/cythonized/sage/misc/lazy_import.c:3768)()
    352             True
    353         """
--> 354         return self.get_object()(*args, **kwds)
    355 
    356     def __repr__(self):

/usr/lib/python2.7/site-packages/sage/misc/sageinspect.py in sage_getdoc(obj, obj_name, embedded_override)
   1911     - extensions by Nick Alexander
   1912     """
-> 1913     import sage.misc.sagedoc
   1914     if obj is None:
   1915         return ''

/usr/lib/python2.7/site-packages/sage/misc/sagedoc.py in <module>()
     49 from sage.misc.temporary_file import tmp_dir
     50 from .viewer import browser
---> 51 from .sphinxify import sphinxify
     52 import sage.version
     53 from sage.env import SAGE_DOC_SRC, SAGE_DOC, SAGE_SRC

/usr/lib/python2.7/site-packages/sage/misc/sphinxify.py in <module>()
     24 from tempfile import mkdtemp
     25 from sage.env import SAGE_DOC_SRC
---> 26 from sphinx.application import Sphinx
     27 
     28 

ImportError: No module named sphinx.application
sage:

I tried sin? on https://sagecell.sagemath.org/ and it works there. So I guess something is wrong with my setup or may be because I am using beta version?

But this was what got installed automatically for me when I searched package manager for sage.

thanks

--Nasser

why ? help does not work for me?

I installed SageMath version 8.3.beta5 on Linux Manjaro 2 days ago first time using its package manager (it build sage, took loooong time).

But for some reason, I can't use the ? help. As in sin? or anything. It gives an error

           ImportError: No module named sphinx.application

For example

sage: sin?
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-24-f06d370d3a79> in <module>()
----> 1 get_ipython().magic(u'pinfo sin')

/usr/lib/python2.7/site-packages/IPython/core/interactiveshell.pyc in magic(self, arg_s)
   2158         magic_name, _, magic_arg_s = arg_s.partition(' ')
   2159         magic_name = magic_name.lstrip(prefilter.ESC_MAGIC)
-> 2160         return self.run_line_magic(magic_name, magic_arg_s)
   2161 
   2162     #-------------------------------------------------------------------------

/usr/lib/python2.7/site-packages/IPython/core/interactiveshell.pyc in run_line_magic(self, magic_name, line)
   2079                 kwargs['local_ns'] = sys._getframe(stack_depth).f_locals
   2080             with self.builtin_trap:
-> 2081                 result = fn(*args,**kwargs)
   2082             return result
   2083 

<decorator-gen-74> in pinfo(self, parameter_s, namespaces)

/usr/lib/python2.7/site-packages/IPython/core/magic.pyc in <lambda>(f, *a, **k)
    186     # but it's overkill for just that one bit of state.
    187     def magic_deco(arg):
--> 188         call = lambda f, *a, **k: f(*a, **k)
    189 
    190         if callable(arg):

/usr/lib/python2.7/site-packages/IPython/core/magics/namespace.pyc in pinfo(self, parameter_s, namespaces)
     59         else:
     60             self.shell._inspect('pinfo', oname, detail_level=detail_level,
---> 61                                 namespaces=namespaces)
     62 
     63     @line_magic

/usr/lib/python2.7/site-packages/IPython/core/interactiveshell.pyc in _inspect(self, meth, oname, namespaces, **kw)
   1534             elif meth == 'pinfo':
   1535                 pmethod(info.obj, oname, formatter, info, 
-> 1536                         enable_html_pager=self.enable_html_pager, **kw)
   1537             else:
   1538                 pmethod(info.obj, oname)

/usr/lib/python2.7/site-packages/IPython/core/oinspect.pyc in pinfo(self, obj, oname, formatter, info, detail_level, enable_html_pager)
    713         - detail_level: if set to 1, more information is given.
    714         """
--> 715         info = self._get_info(obj, oname, formatter, info, detail_level)
    716         if not enable_html_pager:
    717             del info['text/html']

/usr/lib/python2.7/site-packages/IPython/core/oinspect.pyc in _get_info(self, obj, oname, formatter, info, detail_level)
    614         """Retrieve an info dict and format it."""
    615 
--> 616         info = self._info(obj, oname=oname, info=info, detail_level=detail_level)
    617 
    618         _mime = {

/usr/lib/python2.7/site-packages/IPython/core/oinspect.pyc in _info(self, obj, oname, info, detail_level)
    763                     ds += "\nDocstring:\n" + obj.__doc__
    764         else:
--> 765             ds = getdoc(obj)
    766             if ds is None:
    767                 ds = '<no docstring>'

/usr/lib/python2.7/site-packages/sage/misc/lazy_import.pyx in sage.misc.lazy_import.LazyImport.__call__ (build/cythonized/sage/misc/lazy_import.c:3768)()
    352             True
    353         """
--> 354         return self.get_object()(*args, **kwds)
    355 
    356     def __repr__(self):

/usr/lib/python2.7/site-packages/sage/misc/sageinspect.py in sage_getdoc(obj, obj_name, embedded_override)
   1911     - extensions by Nick Alexander
   1912     """
-> 1913     import sage.misc.sagedoc
   1914     if obj is None:
   1915         return ''

/usr/lib/python2.7/site-packages/sage/misc/sagedoc.py in <module>()
     49 from sage.misc.temporary_file import tmp_dir
     50 from .viewer import browser
---> 51 from .sphinxify import sphinxify
     52 import sage.version
     53 from sage.env import SAGE_DOC_SRC, SAGE_DOC, SAGE_SRC

/usr/lib/python2.7/site-packages/sage/misc/sphinxify.py in <module>()
     24 from tempfile import mkdtemp
     25 from sage.env import SAGE_DOC_SRC
---> 26 from sphinx.application import Sphinx
     27 
     28 

ImportError: No module named sphinx.application
sage:

I tried sin? on https://sagecell.sagemath.org/ and it works there. So I guess something is wrong with my setup or may be because I am using beta version?

But this was what got installed automatically for me when I searched package manager for sage.

thanks

--Nasser