Problem with using SymPyPrt on both IPy2 and IPy3

42 views
Skip to first unread message

Shriramana Sharma

unread,
Jun 16, 2013, 12:37:15 PM6/16/13
to sympy
Hello. Has anyone tried to use the SymPyPrt IPython extension for
pretty pretting in *ubuntu Raring?

After upgrading to Raring, I find that I can no longer use the
extension in either IPy2 or IPy3. Previously on Precise it worked out
of the box for IPy2 and after some effort for IPy3. Now I get the
error:

In [1]: from sympy import *

In [2]: %load_ext sympyprt3

In [3]: var('x')
Error (dvipng): use the log property for more information.

Loading up the console from the terminal rather than the menu item (to
get any stderr output) I get:

[IPKernelApp] To connect another client to this kernel, use:
[IPKernelApp] --existing kernel-12196.json
Segmentation fault (core dumped)

It is curious that dvipng should segfault. What is even more curious
is that dvipng has practically not changed in Raring since Precise:
http://packages.ubuntu.com/search?keywords=dvipng&searchon=names&suite=all&section=all
except for a new build. The changelog says it's for some kpathsea
transition but I'm not sure whether that would be the cause of the
problem.

Should I ask about this on some other list perhaps?

--
Shriramana Sharma ஶ்ரீரமணஶர்மா श्रीरमणशर्मा

Shriramana Sharma

unread,
Jun 16, 2013, 12:42:32 PM6/16/13
to sympy
So I also tried this in IPython3 Notebook, but again some problem:

In [1]:

%load_ext sympy.interactive.ipythonprinting

from sympy import *

var('x')

Out[1]:
[Math Processing Error]

Using Firefox 21.

Aaron Meurer

unread,
Jun 16, 2013, 2:58:10 PM6/16/13
to sy...@googlegroups.com
What versions of SymPy and IPython are you using?

Aaron Meurer
> --
> You received this message because you are subscribed to the Google Groups "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sympy+un...@googlegroups.com.
> To post to this group, send email to sy...@googlegroups.com.
> Visit this group at http://groups.google.com/group/sympy.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

Shriramana Sharma

unread,
Jun 16, 2013, 3:03:13 PM6/16/13
to sy...@googlegroups.com
On Mon, Jun 17, 2013 at 12:28 AM, Aaron Meurer <asme...@gmail.com> wrote:
> What versions of SymPy and IPython are you using?

Sorry about that -- python3-sympy 0.7.2-1raring1 and ipython3 0.13.2-1.

Aaron Meurer

unread,
Jun 16, 2013, 3:10:28 PM6/16/13
to sy...@googlegroups.com
We recently fixed a bunch of bugs in the IPython printing extension.
Can you try it in the git master (you don't have to install it, just
git clone and run the IPython notebook from that directory)? See
https://github.com/sympy/sympy/wiki/Getting-the-bleeding-edge.

Aaron Meurer

Shriramana Sharma

unread,
Jun 17, 2013, 12:32:49 AM6/17/13
to sy...@googlegroups.com
On Mon, Jun 17, 2013 at 12:40 AM, Aaron Meurer <asme...@gmail.com> wrote:
> We recently fixed a bunch of bugs in the IPython printing extension.
> Can you try it in the git master (you don't have to install it, just
> git clone and run the IPython notebook from that directory)? See
> https://github.com/sympy/sympy/wiki/Getting-the-bleeding-edge.

Hello -- I found that on IPy Notebook, I was able to get the display
by installing the fonts-mathjax-extras package which provides the PNG
image fonts. See
https://groups.google.com/d/msg/mathjax-users/fb_zE_a41xQ/5JGqxCCnQKMJ

However I still am not able to get the display in IPy qtconsole
whether with IPy2 or IPy3. I removed the installed python-sympy and
python3-sympy packages, navigated to the appropriate directory within
the git tree and ran "ipython qtconsole" and "ipython3 qtconsole", did
"from sympy import *", did "%load_ext sympyprt" or "%load_ext
sympyprt3" and so far no problems, but as usual when I do var('x'), I
should get the beautified x output but I get a segfault notification
on the terminal and the same dvipng error notification within IPy.

Aaron Meurer

unread,
Jun 17, 2013, 12:42:10 AM6/17/13
to sy...@googlegroups.com
In the git SymPy, it uses latex to render in the qtconsole. So that
segfault is likely coming from there. Otherwise, it uses matplotlib,
so you need to have that installed.

Aaron Meurer

Shriramana Sharma

unread,
Jun 17, 2013, 1:13:33 AM6/17/13
to sy...@googlegroups.com
On Mon, Jun 17, 2013 at 10:12 AM, Aaron Meurer <asme...@gmail.com> wrote:
> it uses latex to render in the qtconsole. So that
> segfault is likely coming from there.

Hmm -- it seems it's a DVIPNG bug for whatever reason. Even (the dvi
output of) a simple LaTeX document like:

\documentclass[16pt]{article}
\usepackage{amsmath,amssymb}
\pagestyle{empty}
\begin{document}
$ \infty $
\end{document}

produces a segfault. I have asked about this over at
http://lists.nongnu.org/archive/html/dvipng/ (but the archives
apparently need some time to be updated.)

Shriramana Sharma

unread,
Jun 17, 2013, 4:58:35 AM6/17/13
to sy...@googlegroups.com
On Mon, Jun 17, 2013 at 10:43 AM, Shriramana Sharma <sam...@gmail.com> wrote:
> produces a segfault. I have asked about this over at
> http://lists.nongnu.org/archive/html/dvipng/ (but the archives
> apparently need some time to be updated.)

Hm -- I finally traced this segfault back to dvipng's sources -- a
null pointer was being dereferences and the reason that the pointer
was null in the first place was that xcolor.sty wasn't available since
the latex-xcolor package wasn't installed and installing that fixed
everything.

(I've reported the bug in dvipng of not checking for null before
dereferencing and will report in Debian the bug about dvipng not
having a dependency on latex-xcolor.)

Sorry for the traffic...

Aaron Meurer

unread,
Jun 17, 2013, 10:55:11 AM6/17/13
to sy...@googlegroups.com
I was recently getting errors with dvipdfmx building the PDF docs. I
wonder if it's the same issue.

Aaron Meurer
Reply all
Reply to author
Forward
0 new messages