ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Thu, 17 May 2012 09:12:40 +0200Sage on Mac Os X lionhttps://ask.sagemath.org/question/7498/sage-on-mac-os-x-lion/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/app-installation-problem-on-mac-os-x-lion
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/lbundle/.sage//tmp
TOUCH=touch
GPDOCDIR=/Applications/Sage-4.8-OSX-64bit-10.6.app/Contents/Resources/sage/local/share/pari/doc
SAGE64=yes
_=/usr/bin/env
Mon, 05 Mar 2012 23:35:05 +0100https://ask.sagemath.org/question/7498/sage-on-mac-os-x-lion/Comment by kcrisman for <div class="snippet"><p>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.</p>
<p>When I try to run a terminal version it says </p>
<pre><code>/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]
</code></pre>
<p>I have installed python-2.7 and used easy_script to install deadline and python as shown in this question: <a href="http://ask.sagemath.org/question/740/app-installation-problem-on-mac-os-x-lion">http://ask.sagemath.org/question/740/...</a></p>
<p>How can I fix this?</p>
<p>ADDENDUM:</p>
<p>I have restarted terminal as Ivan Andrus suggested. It's still the same issue. The env is</p>
<pre><code>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 ...</code></pre><span class="expander"> <a>(more)</a></span></div>https://ask.sagemath.org/question/7498/sage-on-mac-os-x-lion/?comment=19783#post-id-19783Just 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!Thu, 17 May 2012 09:12:40 +0200https://ask.sagemath.org/question/7498/sage-on-mac-os-x-lion/?comment=19783#post-id-19783Answer by kcrisman for <div class="snippet"><p>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.</p>
<p>When I try to run a terminal version it says </p>
<pre><code>/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]
</code></pre>
<p>I have installed python-2.7 and used easy_script to install deadline and python as shown in this question: <a href="http://ask.sagemath.org/question/740/app-installation-problem-on-mac-os-x-lion">http://ask.sagemath.org/question/740/...</a></p>
<p>How can I fix this?</p>
<p>ADDENDUM:</p>
<p>I have restarted terminal as Ivan Andrus suggested. It's still the same issue. The env is</p>
<pre><code>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 ...</code></pre><span class="expander"> <a>(more)</a></span></div> https://ask.sagemath.org/question/7498/sage-on-mac-os-x-lion/?answer=13324#post-id-13324We believe that the correct fix for the original problem is at [Trac 12161](http://trac.sagemath.org/sage_trac/ticket/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.Tue, 06 Mar 2012 09:31:36 +0100https://ask.sagemath.org/question/7498/sage-on-mac-os-x-lion/?answer=13324#post-id-13324Comment by kcrisman for <p>We believe that the correct fix for the original problem is at <a href="http://trac.sagemath.org/sage_trac/ticket/12161">Trac 12161</a>, but I don't know for sure if that would fix your problem as well. </p>
<p>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.</p>
<p>Another option would be to try to build from scratch, if you have Xcode. That is less desirable, but does now work.</p>
https://ask.sagemath.org/question/7498/sage-on-mac-os-x-lion/?comment=20159#post-id-20159I 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.Wed, 07 Mar 2012 11:55:09 +0100https://ask.sagemath.org/question/7498/sage-on-mac-os-x-lion/?comment=20159#post-id-20159Comment by John Smith for <p>We believe that the correct fix for the original problem is at <a href="http://trac.sagemath.org/sage_trac/ticket/12161">Trac 12161</a>, but I don't know for sure if that would fix your problem as well. </p>
<p>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.</p>
<p>Another option would be to try to build from scratch, if you have Xcode. That is less desirable, but does now work.</p>
https://ask.sagemath.org/question/7498/sage-on-mac-os-x-lion/?comment=20162#post-id-20162@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) Tue, 06 Mar 2012 21:27:34 +0100https://ask.sagemath.org/question/7498/sage-on-mac-os-x-lion/?comment=20162#post-id-20162Comment by Ivan Andrus for <p>We believe that the correct fix for the original problem is at <a href="http://trac.sagemath.org/sage_trac/ticket/12161">Trac 12161</a>, but I don't know for sure if that would fix your problem as well. </p>
<p>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.</p>
<p>Another option would be to try to build from scratch, if you have Xcode. That is less desirable, but does now work.</p>
https://ask.sagemath.org/question/7498/sage-on-mac-os-x-lion/?comment=20158#post-id-20158@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.Wed, 07 Mar 2012 16:53:36 +0100https://ask.sagemath.org/question/7498/sage-on-mac-os-x-lion/?comment=20158#post-id-20158Comment by Ivan Andrus for <p>We believe that the correct fix for the original problem is at <a href="http://trac.sagemath.org/sage_trac/ticket/12161">Trac 12161</a>, but I don't know for sure if that would fix your problem as well. </p>
<p>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.</p>
<p>Another option would be to try to build from scratch, if you have Xcode. That is less desirable, but does now work.</p>
https://ask.sagemath.org/question/7498/sage-on-mac-os-x-lion/?comment=20163#post-id-20163To 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.Tue, 06 Mar 2012 15:34:50 +0100https://ask.sagemath.org/question/7498/sage-on-mac-os-x-lion/?comment=20163#post-id-20163