Ask Your Question
1

Sage on Mac Os X lion

asked 2012-03-05 23:35:05 +0200

John Smith gravatar image

updated 2015-10-22 21:41:20 +0200

FrédéricC gravatar image

I am trying to run sage on Lion I have downloaded the Sage 4.8 app version. When I try to run it it fails to start.

When I try to run a terminal version it says

/Applications/Sage-4.8-OSX-64bit-10.6.app/Contents/Resources/sage/sage; exit

----------------------------------------------------------------------
| Sage Version 4.8, Release Date: 2012-01-20                         |
| Type notebook() for the GUI, and license() for information.        |
----------------------------------------------------------------------

Traceback (most recent call last):
  File "/Applications/Sage-4.8-OSX-64bit-10.6.app/Contents/Resources/sage/local/bin/sage-ipython", line 18, in <module>
import IPython
ImportError: No module named IPython
logout

[Process completed]

I have installed python-2.7 and used easy_script to install deadline and python as shown in this question: http://ask.sagemath.org/question/740/...

How can I fix this?

ADDENDUM:

I have restarted terminal as Ivan Andrus suggested. It's still the same issue. The env is

AS=as
AR=ar
LDFLAGS=
TERM_PROGRAM=Apple_Terminal
RHOME=/Applications/Sage-4.8-OSX-64bit-10.6.app/Contents/Resources/sage/local/lib/R
UNAME=Darwin
ECLDIR=/Applications/Sage-4.8-OSX-64bit-10.6.app/Contents/Resources/sage/local/lib/ecl/
TERM=xterm-256color
SAGE_SERVER=http://www.sagemath.org/
SAGE_ORIG_LD_LIBRARY_PATH_SET=True
SHELL=/bin/bash
SAGE_DATA=/Applications/Sage-4.8-OSX-64bit-10.6.app/Contents/Resources/sage/data
SAGE_ENV_SOURCED=1
HGENCODING=utf8
TMPDIR=/var/folders/15/tkpptkzn4xd90grldw4v6pd40000gn/T/
LIBRARY_PATH=/Applications/Sage-4.8-OSX-64bit- 10.6.app/Contents/Resources/sage/local/lib/
MKDIR=mkdir
Apple_PubSub_Socket_Render=/tmp/launch-g7XJ8H/Render
TERM_PROGRAM_VERSION=299
TERM_SESSION_ID=1385579C-9774-4175-A784-C41ED683ADA1
SAGE_NUM_THREADS=1
DOT_SAGE=/Users/lbundle/.sage/
USER=lbundle
SINGULAR_EXECUTABLE=/Applications/Sage-4.8-OSX-64bit-10.6.app/Contents/Resources/sage/local/bin/Singular
COMMAND_MODE=unix2003
HGPLAIN=yes
SAGE_ORIG_DYLD_LIBRARY_PATH_SET=True
SSH_AUTH_SOCK=/tmp/launch-Eg1jHu/Listeners
__CF_USER_TEXT_ENCODING=0x1F5:0:0
SAGE_LOCAL=/Applications/Sage-4.8-OSX-64bit-10.6.app/Contents/Resources/sage/local
MPLCONFIGDIR=/Users/lbundle/.sage//matplotlib-1.0.1
MAXIMA_PREFIX=/Applications/Sage-4.8-OSX-64bit-10.6.app/Contents/Resources/sage/local
SAGE_STARTUP_FILE=/Users/lbundle/.sage//init.sage
PATH=/Library/Frameworks/Python.framework/Versions/2.7/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/texbin:/Applications/Sage-4.8-OSX-64bit-10.6.app/Contents/Resources/sage/local/Frameworks/Python.framework/Versions/2.5/bin:/Applications/Sage-4.8-OSX-64bit-10.6.app/Contents/Resources/sage:/Applications/Sage-4.8-OSX-64bit-10.6.app/Contents/Resources/sage/local/bin
LD=ld
PWD=/Users/lbundle
MV=mv
LANG=en_US.UTF-8
__sage__=
SAGE_ROOT=/Applications/Sage-4.8-OSX-64bit-10.6.app/Contents/Resources/sage
PYTHONHOME=/Applications/Sage-4.8-OSX-64bit-10.6.app/Contents/Resources/sage/local
SAGE_PACKAGES=/Applications/Sage-4.8-OSX-64bit-10.6.app/Contents/Resources/sage/spkg
CP=cp
LN=ln
CXX=g++
SHLVL=3
HOME=/Users/lbundle
MAKE=make
MACOSX_DEPLOYMENT_TARGET=10.7
PYTHONPATH=/Applications/Sage-4.8-OSX-64bit-10.6.app/Contents/Resources/sage/local/lib/python
SAGE_ORIG_LD_LIBRARY_PATH=
LOGNAME=lbundle
GPHELP=/Applications/Sage-4.8-OSX-64bit-10.6.app/Contents/Resources/sage/local/bin/gphelp
SAGE_ORIG_DYLD_LIBRARY_PATH=
SAGE_DOC=/Applications/Sage-4.8-OSX-64bit-10.6.app/Contents/Resources/sage/devel/sage/doc
PKG_CONFIG_PATH=/Applications/Sage-4.8-OSX-64bit-10.6.app/Contents/Resources/sage/local/lib/pkgconfig
RANLIB=ranlib
SINGULARPATH=/Applications/Sage-4.8-OSX-64bit-10.6.app/Contents/Resources/sage/local/share/singular
CC=gcc
DISPLAY=/tmp/launch-hEl27Z/org.x:0
CHMOD=chmod
SAGE_NUM_THREADS_PARALLEL=8
GP_DATA_DIR=/Applications/Sage-4.8-OSX-64bit-10.6.app/Contents/Resources/sage/local/share/pari
SAGE_TESTDIR=/Users ...
(more)
edit retag flag offensive close merge delete

Comments

Just following up - did the last few comments help? Can you try the 5.0 binary (released recently) to see if your problem was solved? Thanks!

kcrisman gravatar imagekcrisman ( 2012-05-17 09:12:40 +0200 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2012-03-06 09:31:36 +0200

kcrisman gravatar image

We believe that the correct fix for the original problem is at Trac 12161, but I don't know for sure if that would fix your problem as well.

You can probably try to fix this by modifying the actual file in the app to see if that would do it. You won't want to recreate a binary from scratch, but it's possible that finding the right file in the app bundle would do it. I don't have on on hand to find the exact path right now, but hopefully another commentator will.

Another option would be to try to build from scratch, if you have Xcode. That is less desirable, but does now work.

edit flag offensive delete link more

Comments

To see if Trac 12161 will fix the problem what you must do is close Terminal.app. You have to actually quit it rather than just close all the windows. Then open Terminal.app from the Finder by going to `Applications > Utilities > Terminal`. At this point you can run Sage directly from the terminal or by using Sage.app to launch it. If this doesn't solve the problem then please report the results of running `env` in a terminal.

Ivan Andrus gravatar imageIvan Andrus ( 2012-03-06 15:34:50 +0200 )edit
1

@IvanAndrus: I've added the environment to the question. (btw, it's interesting that you underestimate my ability to open Terminal, but expect me to be able to run env, just an observation)

John Smith gravatar imageJohn Smith ( 2012-03-06 21:27:34 +0200 )edit

I bet what Ivan means is you have to close Sage.app! You have all kinds of Sage-specific variables that don't show up when I type env. Notice in particular you have `SAGE_ENV_SOURCED=1` while at #12161 we have `SAGE_ENV_SOURCED= ` so perhaps that is the issue. Anyway, close Terminal, Sage.app, everything, and *then* try to start Sage directly from the Terminal the way you did at the beginning of your question. Hopefully this fixes it.

kcrisman gravatar imagekcrisman ( 2012-03-07 11:55:09 +0200 )edit

@John Fair point. It's just that I was helping someone else with this problem and based on the behavior reported I assumed he hadn't quit Terminal. But it's the same behavior you're reporting (namely `SAGE_*` variables in your environment) so perhaps a logout or restart is required in some cases? Anyway unsetting `SAGE_ENV_SOURCED` and running sage should also work and is perhaps easier, though you will have to do it in every terminal which you wish to use.

Ivan Andrus gravatar imageIvan Andrus ( 2012-03-07 16:53:36 +0200 )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: 2012-03-05 23:35:05 +0200

Seen: 1,170 times

Last updated: Mar 06 '12