Re: [sage-support] command line matplotlib/scipy/numpy on Mac

6 views
Skip to first unread message

William Stein

unread,
Sep 14, 2009, 1:57:40 PM9/14/09
to sage-s...@googlegroups.com, Brian Granger, spd-dev
On Mon, Sep 14, 2009 at 10:29 AM, Craig Jones <brec...@gmail.com> wrote:
>
> I have been using Enthought to use the scipy/numpy/matplotlib.  But it
> is compiled as 32 bit for the Mac.  Someone suggested I use Sage from
> the command line as it is compiled 64-bit for the Mac.
>
> I am running it as:
>
> env PYTHONPATH=$PYTHONPATH:/Applications/sage/local/lib/python2.6/site-
> packages DYLD_LIBRARY_PATH=/Applications/sage/local/lib:
> $DYLD_LIBRARY_PATH PATH=/Applications/sage/local/bin:$PATH local/bin/
> ipython
>
> This gives me a prompt (and is 64 bit), but I can't do any plotting
> via matplotlib.  The error is:
>
> ImportError: cannot import name _macosx
> WARNING: Loading of matplotlib.pylab failed.
>
> The backend_macosx.py exists but _macosx.{py,pyc,so} do not exist.
> Any idea how I could get this going?

(1) You should just do

sage -ipython

(2) Unfortunately we currently don't build Python as a "Framework
build" on OS X, so the GUI interface doesn't work, though you can
still create plots and save them in any other format (png, eps, etc.),
which is what we do in the sage notebook. This will change, since
building Python as a Framework build is also important for fully
Mayavi support, which we very much want.

William

Reply all
Reply to author
Forward
0 new messages