In my both Mac (OS X Mavericks) and Ubuntu machine, I have installed sympy that is a python library for symbolic mathematics. Part of sympy
is the pretty print functionality that uses unicode characters to prettify symbolic expressions in the command-line environments with unicode support. For example, in my Ubuntu machine and in its gnome-terminal
running the following code
from sympy import *
x = Symbol("x")
pprint(Integral(sqrt(1/x), x))
renders to
However, the same command in OS X with iTerm2 (that should support unicode) results in
I'm using sympy 0.7.5
that I have made from source with the latest build of iTerm2
(Build 1.0.0.20140518). Is there anything that I miss here? The lead developer of sympy is one of the StackExchange network. It would be great to know his opinion on this one.
Exception in SymPy Live of type <type 'exceptions.UnicodeEncodeError'>
[. . . ]UnicodeEncodeError: 'ascii' codec can't encode character u'\u2320' in position 0: ordinal not in range(128)
. I can send you the whole error output if you like.