ASKSAGE: Sage Q&A Forum - Individual question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Wed, 21 Mar 2012 10:29:15 -0500Install problem app on mac os xhttp://ask.sagemath.org/question/8531/install-problem-app-on-mac-os-x/Hi,
I've installed the app (4.7.2) on my Mac (OS 10.6.8). When I launch the app I have the following error. Could someone provide me a **simple** fix please? (I'm really not fluent with the Unix commands...).
Thank you in advance.
Here is what have in the Terminal console:
Sage Version 4.7.2, Release Date: 2011-10-29
Type notebook() for the GUI, and license() for information.
Traceback (most recent call last):
File "/Applications/Sage-4.7.2-OSX-64bit-10.6.app/Contents/Resources/sage//local/bin/sage-ipython", line 18, in <module>
import IPython
File "/Applications/Sage-4.7.2-OSX-64bit-10.6.app/Contents/Resources/sage/local/lib/python2.6/site-packages/IPython/__init__.py", line 58, in <module>
__import__(name,glob,loc,[])
File "/Applications/Sage-4.7.2-OSX-64bit-10.6.app/Contents/Resources/sage/local/lib/python2.6/site-packages/IPython/ipstruct.py", line 17, in <module>
from IPython.genutils import list2dict2
File "/Applications/Sage-4.7.2-OSX-64bit-10.6.app/Contents/Resources/sage/local/lib/python2.6/site-packages/IPython/genutils.py", line 26, in <module>
import shlex
File "/Applications/Sage-4.7.2-OSX-64bit-10.6.app/Contents/Resources/sage/local/lib/python/shlex.py", line 12, in <module>
from collections import deque
File "/Applications/Sage-4.7.2-OSX-64bit-10.6.app/Contents/Resources/sage/local/lib/python/collections.py", line 9, in <module>
from operator import itemgetter as _itemgetter
ImportError: dlopen(/Applications/Sage-4.7.2-OSX-64bit-10.6.app/Contents/Resources/sage/local/lib/python2.6/lib-dynload/operator.so, 2): Symbol not found: __PyUnicodeUCS4_AsDefaultEncodedString
Referenced from: /Applications/Sage-4.7.2-OSX-64bit-10.6.app/Contents/Resources/sage/local/lib/python2.6/lib-dynload/operator.so
Expected in: flat namespace
in /Applications/Sage-4.7.2-OSX-64bit-10.6.app/Contents/Resources/sage/local/lib/python2.6/lib-dynload/operator.so
Mon, 05 Dec 2011 12:24:16 -0600http://ask.sagemath.org/question/8531/install-problem-app-on-mac-os-x/Answer by wnshall for <p>Hi,
I've installed the app (4.7.2) on my Mac (OS 10.6.8). When I launch the app I have the following error. Could someone provide me a <strong>simple</strong> fix please? (I'm really not fluent with the Unix commands...). </p>
<p>Thank you in advance.</p>
<p>Here is what have in the Terminal console:</p>
<pre><code>Sage Version 4.7.2, Release Date: 2011-10-29
Type notebook() for the GUI, and license() for information.
Traceback (most recent call last):
File "/Applications/Sage-4.7.2-OSX-64bit-10.6.app/Contents/Resources/sage//local/bin/sage-ipython", line 18, in <module>
import IPython
File "/Applications/Sage-4.7.2-OSX-64bit-10.6.app/Contents/Resources/sage/local/lib/python2.6/site-packages/IPython/__init__.py", line 58, in <module>
__import__(name,glob,loc,[])
File "/Applications/Sage-4.7.2-OSX-64bit-10.6.app/Contents/Resources/sage/local/lib/python2.6/site-packages/IPython/ipstruct.py", line 17, in <module>
from IPython.genutils import list2dict2
File "/Applications/Sage-4.7.2-OSX-64bit-10.6.app/Contents/Resources/sage/local/lib/python2.6/site-packages/IPython/genutils.py", line 26, in <module>
import shlex
File "/Applications/Sage-4.7.2-OSX-64bit-10.6.app/Contents/Resources/sage/local/lib/python/shlex.py", line 12, in <module>
from collections import deque
File "/Applications/Sage-4.7.2-OSX-64bit-10.6.app/Contents/Resources/sage/local/lib/python/collections.py", line 9, in <module>
from operator import itemgetter as _itemgetter
ImportError: dlopen(/Applications/Sage-4.7.2-OSX-64bit-10.6.app/Contents/Resources/sage/local/lib/python2.6/lib-dynload/operator.so, 2): Symbol not found: __PyUnicodeUCS4_AsDefaultEncodedString
Referenced from: /Applications/Sage-4.7.2-OSX-64bit-10.6.app/Contents/Resources/sage/local/lib/python2.6/lib-dynload/operator.so
Expected in: flat namespace
in /Applications/Sage-4.7.2-OSX-64bit-10.6.app/Contents/Resources/sage/local/lib/python2.6/lib-dynload/operator.so
</code></pre>
http://ask.sagemath.org/question/8531/install-problem-app-on-mac-os-x/?answer=13153#post-id-13153I'm having the same problem. Changing the $PATH as suggested above didn't help. Entered
/Applications/Sage-4.7.2-OSX-64bit-10.6.app/Contents/Resources/sage/sage -c "print os.getenv('PATH')"
as suggested above, and got this error:
Traceback (most recent call last):
File "/Applications/Sage-4.7.2-OSX-64bit-10.6.app/Contents/Resources/sage//local/bin/sage-eval", line 4, in <module>
from sage.all import *
File "/Users/buildbot/build/sage/bsd-1/bsd_64_binary/build/sage-4.7.2/local/lib/python2.6/site-packages/sage/all.py", line 63, in <module>
ImportError: dlopen(/Applications/Sage-4.7.2-OSX-64bit-10.6.app/Contents/Resources/sage/local/lib/python2.6/site-packages/sage/ext/c_lib.so, 2): Library not loaded: libcsage.dylib
Referenced from: /Applications/Sage-4.7.2-OSX-64bit-10.6.app/Contents/Resources/sage/local/lib/python2.6/site-packages/sage/ext/c_lib.so
Reason: no suitable image found. Did find:
/usr/local/lib/libcsage.dylib: stat() failed with errno=13
Has anyone had any luck using the 4.7 version, or the 32 bit version?
Thu, 19 Jan 2012 09:35:09 -0600http://ask.sagemath.org/question/8531/install-problem-app-on-mac-os-x/?answer=13153#post-id-13153Comment by Ivan Andrus for <p>I'm having the same problem. Changing the $PATH as suggested above didn't help. Entered </p>
<pre><code>/Applications/Sage-4.7.2-OSX-64bit-10.6.app/Contents/Resources/sage/sage -c "print os.getenv('PATH')"
</code></pre>
<p>as suggested above, and got this error:</p>
<pre><code> Traceback (most recent call last):
File "/Applications/Sage-4.7.2-OSX-64bit-10.6.app/Contents/Resources/sage//local/bin/sage-eval", line 4, in <module>
from sage.all import *
File "/Users/buildbot/build/sage/bsd-1/bsd_64_binary/build/sage-4.7.2/local/lib/python2.6/site-packages/sage/all.py", line 63, in <module>
ImportError: dlopen(/Applications/Sage-4.7.2-OSX-64bit-10.6.app/Contents/Resources/sage/local/lib/python2.6/site-packages/sage/ext/c_lib.so, 2): Library not loaded: libcsage.dylib
Referenced from: /Applications/Sage-4.7.2-OSX-64bit-10.6.app/Contents/Resources/sage/local/lib/python2.6/site-packages/sage/ext/c_lib.so
Reason: no suitable image found. Did find:
/usr/local/lib/libcsage.dylib: stat() failed with errno=13
</code></pre>
<p>Has anyone had any luck using the 4.7 version, or the 32 bit version?</p>
http://ask.sagemath.org/question/8531/install-problem-app-on-mac-os-x/?comment=20486#post-id-20486The fact that I see `/Users/buildbot/build/` in the backtrace makes me think that Sage didn't get properly relocated. The first time it runs it will spend quite a long time changing certain paths. I don't know all the details, but it warns not to be interrupted. If it did I think it would end up with something like the above. Did you perchance force quit it the first time it ran or something? Or perhaps it crashed. Anyway, one thing you could try is deleting the app and then "re-installing" from the disk image. That should reset where it thinks it is and run the relocation process.Thu, 19 Jan 2012 21:36:12 -0600http://ask.sagemath.org/question/8531/install-problem-app-on-mac-os-x/?comment=20486#post-id-20486Answer by Ivan Andrus for <p>Hi,
I've installed the app (4.7.2) on my Mac (OS 10.6.8). When I launch the app I have the following error. Could someone provide me a <strong>simple</strong> fix please? (I'm really not fluent with the Unix commands...). </p>
<p>Thank you in advance.</p>
<p>Here is what have in the Terminal console:</p>
<pre><code>Sage Version 4.7.2, Release Date: 2011-10-29
Type notebook() for the GUI, and license() for information.
Traceback (most recent call last):
File "/Applications/Sage-4.7.2-OSX-64bit-10.6.app/Contents/Resources/sage//local/bin/sage-ipython", line 18, in <module>
import IPython
File "/Applications/Sage-4.7.2-OSX-64bit-10.6.app/Contents/Resources/sage/local/lib/python2.6/site-packages/IPython/__init__.py", line 58, in <module>
__import__(name,glob,loc,[])
File "/Applications/Sage-4.7.2-OSX-64bit-10.6.app/Contents/Resources/sage/local/lib/python2.6/site-packages/IPython/ipstruct.py", line 17, in <module>
from IPython.genutils import list2dict2
File "/Applications/Sage-4.7.2-OSX-64bit-10.6.app/Contents/Resources/sage/local/lib/python2.6/site-packages/IPython/genutils.py", line 26, in <module>
import shlex
File "/Applications/Sage-4.7.2-OSX-64bit-10.6.app/Contents/Resources/sage/local/lib/python/shlex.py", line 12, in <module>
from collections import deque
File "/Applications/Sage-4.7.2-OSX-64bit-10.6.app/Contents/Resources/sage/local/lib/python/collections.py", line 9, in <module>
from operator import itemgetter as _itemgetter
ImportError: dlopen(/Applications/Sage-4.7.2-OSX-64bit-10.6.app/Contents/Resources/sage/local/lib/python2.6/lib-dynload/operator.so, 2): Symbol not found: __PyUnicodeUCS4_AsDefaultEncodedString
Referenced from: /Applications/Sage-4.7.2-OSX-64bit-10.6.app/Contents/Resources/sage/local/lib/python2.6/lib-dynload/operator.so
Expected in: flat namespace
in /Applications/Sage-4.7.2-OSX-64bit-10.6.app/Contents/Resources/sage/local/lib/python2.6/lib-dynload/operator.so
</code></pre>
http://ask.sagemath.org/question/8531/install-problem-app-on-mac-os-x/?answer=13168#post-id-13168Georg S. Weber found a problem with the app which is being tracked as [ticket #12161](http://trac.sagemath.org/sage_trac/ticket/12161). Hopefully this is your problem since we have a fix for it. :-) The problem should only manifest itself if you have not successfully run (a sufficiently new version of) the Sage notebook before. One way to work around it is to start Terminal.app _before_ running Sage. To be more precise:
1. Quit Sage.app and Terminal.app if they are open.
2. Start Terminal.app (located at `/Applications/Utilities/Terminal.app`)
3. Start Sage.app
4. A new window should open in Terminal.app and ask you for a password for the notebook
At the very least this might be @lharris's problem.Sun, 22 Jan 2012 05:32:58 -0600http://ask.sagemath.org/question/8531/install-problem-app-on-mac-os-x/?answer=13168#post-id-13168Comment by Ivan Andrus for <p>Georg S. Weber found a problem with the app which is being tracked as <a href="http://trac.sagemath.org/sage_trac/ticket/12161">ticket #12161</a>. Hopefully this is your problem since we have a fix for it. :-) The problem should only manifest itself if you have not successfully run (a sufficiently new version of) the Sage notebook before. One way to work around it is to start Terminal.app _before_ running Sage. To be more precise:</p>
<ol>
<li>Quit Sage.app and Terminal.app if they are open.</li>
<li>Start Terminal.app (located at <code>/Applications/Utilities/Terminal.app</code>)</li>
<li>Start Sage.app</li>
<li>A new window should open in Terminal.app and ask you for a password for the notebook</li>
</ol>
<p>At the very least this might be <a href="/users/679/lharris/">@lharris</a>'s problem.</p>
http://ask.sagemath.org/question/8531/install-problem-app-on-mac-os-x/?comment=20095#post-id-20095There is a new 4.8 binary up which was jury-rigged to fix this problem. When you try to download it from a mirror it will be called `...-app.p0.dmg`, otherwise it's the old one.Wed, 21 Mar 2012 10:29:15 -0500http://ask.sagemath.org/question/8531/install-problem-app-on-mac-os-x/?comment=20095#post-id-20095Answer by lharris for <p>Hi,
I've installed the app (4.7.2) on my Mac (OS 10.6.8). When I launch the app I have the following error. Could someone provide me a <strong>simple</strong> fix please? (I'm really not fluent with the Unix commands...). </p>
<p>Thank you in advance.</p>
<p>Here is what have in the Terminal console:</p>
<pre><code>Sage Version 4.7.2, Release Date: 2011-10-29
Type notebook() for the GUI, and license() for information.
Traceback (most recent call last):
File "/Applications/Sage-4.7.2-OSX-64bit-10.6.app/Contents/Resources/sage//local/bin/sage-ipython", line 18, in <module>
import IPython
File "/Applications/Sage-4.7.2-OSX-64bit-10.6.app/Contents/Resources/sage/local/lib/python2.6/site-packages/IPython/__init__.py", line 58, in <module>
__import__(name,glob,loc,[])
File "/Applications/Sage-4.7.2-OSX-64bit-10.6.app/Contents/Resources/sage/local/lib/python2.6/site-packages/IPython/ipstruct.py", line 17, in <module>
from IPython.genutils import list2dict2
File "/Applications/Sage-4.7.2-OSX-64bit-10.6.app/Contents/Resources/sage/local/lib/python2.6/site-packages/IPython/genutils.py", line 26, in <module>
import shlex
File "/Applications/Sage-4.7.2-OSX-64bit-10.6.app/Contents/Resources/sage/local/lib/python/shlex.py", line 12, in <module>
from collections import deque
File "/Applications/Sage-4.7.2-OSX-64bit-10.6.app/Contents/Resources/sage/local/lib/python/collections.py", line 9, in <module>
from operator import itemgetter as _itemgetter
ImportError: dlopen(/Applications/Sage-4.7.2-OSX-64bit-10.6.app/Contents/Resources/sage/local/lib/python2.6/lib-dynload/operator.so, 2): Symbol not found: __PyUnicodeUCS4_AsDefaultEncodedString
Referenced from: /Applications/Sage-4.7.2-OSX-64bit-10.6.app/Contents/Resources/sage/local/lib/python2.6/lib-dynload/operator.so
Expected in: flat namespace
in /Applications/Sage-4.7.2-OSX-64bit-10.6.app/Contents/Resources/sage/local/lib/python2.6/lib-dynload/operator.so
</code></pre>
http://ask.sagemath.org/question/8531/install-problem-app-on-mac-os-x/?answer=13123#post-id-13123I had this same problem when trying to run Sage. My problem arose because the standard OS X python is being called instead of Sage's python, because the install script puts the path to Sage's executables AFTER /usr/bin/ in the $PATH variable.
My work-around was to open a new terminal window and enter the following two lines:
export PATH=/Applications/Sage-4.7.2-OSX-64bit-10.6.app/Contents/Resources/:$PATH
'/Applications/Sage-4.7.2-OSX-64bit-10.6.app/Contents/Resources/sage/'/sage --notebook
This presumes you are running BASH, which is what recent versions of OS X use by default, and that you are running the Sage-4.7.2-OSX-64bit-10.6.app version of Sage; change the path to your Sage installation if you are using a different version. (I got the idea to do this from <a href=http://www.mail-archive.com/spacewalk-list@redhat.com/msg05482.html>this posting</a> on a mailing list.)
Sat, 14 Jan 2012 17:55:49 -0600http://ask.sagemath.org/question/8531/install-problem-app-on-mac-os-x/?answer=13123#post-id-13123Comment by Ivan Andrus for <p>I had this same problem when trying to run Sage. My problem arose because the standard OS X python is being called instead of Sage's python, because the install script puts the path to Sage's executables AFTER /usr/bin/ in the $PATH variable.</p>
<p>My work-around was to open a new terminal window and enter the following two lines:</p>
<pre><code>export PATH=/Applications/Sage-4.7.2-OSX-64bit-10.6.app/Contents/Resources/:$PATH
'/Applications/Sage-4.7.2-OSX-64bit-10.6.app/Contents/Resources/sage/'/sage --notebook
</code></pre>
<p>This presumes you are running BASH, which is what recent versions of OS X use by default, and that you are running the Sage-4.7.2-OSX-64bit-10.6.app version of Sage; change the path to your Sage installation if you are using a different version. (I got the idea to do this from <a href="http://www.mail-archive.com/spacewalk-list@redhat.com/msg05482.html">this posting</a> on a mailing list.)</p>
http://ask.sagemath.org/question/8531/install-problem-app-on-mac-os-x/?comment=20530#post-id-20530If PATH is setup incorrectly, that is a huge bug in Sage. Did you build your own or use a prebuilt binary? What does `/Applications/Sage-4.7.2-OSX-64bit-10.6.app/Contents/Resources/sage/sage -c "print os.getenv('PATH')"` show?Mon, 16 Jan 2012 20:49:28 -0600http://ask.sagemath.org/question/8531/install-problem-app-on-mac-os-x/?comment=20530#post-id-20530Comment by Ivan Andrus for <p>I had this same problem when trying to run Sage. My problem arose because the standard OS X python is being called instead of Sage's python, because the install script puts the path to Sage's executables AFTER /usr/bin/ in the $PATH variable.</p>
<p>My work-around was to open a new terminal window and enter the following two lines:</p>
<pre><code>export PATH=/Applications/Sage-4.7.2-OSX-64bit-10.6.app/Contents/Resources/:$PATH
'/Applications/Sage-4.7.2-OSX-64bit-10.6.app/Contents/Resources/sage/'/sage --notebook
</code></pre>
<p>This presumes you are running BASH, which is what recent versions of OS X use by default, and that you are running the Sage-4.7.2-OSX-64bit-10.6.app version of Sage; change the path to your Sage installation if you are using a different version. (I got the idea to do this from <a href="http://www.mail-archive.com/spacewalk-list@redhat.com/msg05482.html">this posting</a> on a mailing list.)</p>
http://ask.sagemath.org/question/8531/install-problem-app-on-mac-os-x/?comment=20484#post-id-20484As noted in @LDCruise's answer, this won't work. Try `.../sage -sh` then `env | grep SAGE` and `echo $PATH`.Thu, 19 Jan 2012 21:41:01 -0600http://ask.sagemath.org/question/8531/install-problem-app-on-mac-os-x/?comment=20484#post-id-20484Answer by LDCruise for <p>Hi,
I've installed the app (4.7.2) on my Mac (OS 10.6.8). When I launch the app I have the following error. Could someone provide me a <strong>simple</strong> fix please? (I'm really not fluent with the Unix commands...). </p>
<p>Thank you in advance.</p>
<p>Here is what have in the Terminal console:</p>
<pre><code>Sage Version 4.7.2, Release Date: 2011-10-29
Type notebook() for the GUI, and license() for information.
Traceback (most recent call last):
File "/Applications/Sage-4.7.2-OSX-64bit-10.6.app/Contents/Resources/sage//local/bin/sage-ipython", line 18, in <module>
import IPython
File "/Applications/Sage-4.7.2-OSX-64bit-10.6.app/Contents/Resources/sage/local/lib/python2.6/site-packages/IPython/__init__.py", line 58, in <module>
__import__(name,glob,loc,[])
File "/Applications/Sage-4.7.2-OSX-64bit-10.6.app/Contents/Resources/sage/local/lib/python2.6/site-packages/IPython/ipstruct.py", line 17, in <module>
from IPython.genutils import list2dict2
File "/Applications/Sage-4.7.2-OSX-64bit-10.6.app/Contents/Resources/sage/local/lib/python2.6/site-packages/IPython/genutils.py", line 26, in <module>
import shlex
File "/Applications/Sage-4.7.2-OSX-64bit-10.6.app/Contents/Resources/sage/local/lib/python/shlex.py", line 12, in <module>
from collections import deque
File "/Applications/Sage-4.7.2-OSX-64bit-10.6.app/Contents/Resources/sage/local/lib/python/collections.py", line 9, in <module>
from operator import itemgetter as _itemgetter
ImportError: dlopen(/Applications/Sage-4.7.2-OSX-64bit-10.6.app/Contents/Resources/sage/local/lib/python2.6/lib-dynload/operator.so, 2): Symbol not found: __PyUnicodeUCS4_AsDefaultEncodedString
Referenced from: /Applications/Sage-4.7.2-OSX-64bit-10.6.app/Contents/Resources/sage/local/lib/python2.6/lib-dynload/operator.so
Expected in: flat namespace
in /Applications/Sage-4.7.2-OSX-64bit-10.6.app/Contents/Resources/sage/local/lib/python2.6/lib-dynload/operator.so
</code></pre>
http://ask.sagemath.org/question/8531/install-problem-app-on-mac-os-x/?answer=13107#post-id-13107I'm having the same problem. When I entered
/Applications/Sage-4.7.2-OSX-64bit-10.6.app/Contents/Resources/sage/sage -c "print os.getenv('PATH')"
I get
'import site' failed; use -v for traceback
Traceback (most recent call last):
File "/Applications/Sage-4.7.2-OSX-64bit-10.6.app/Contents/Resources/sage/local/bin/sage-location", line 3, in <module>
import os, sys
ImportError: No module named os
Tue, 17 Jan 2012 05:34:13 -0600http://ask.sagemath.org/question/8531/install-problem-app-on-mac-os-x/?answer=13107#post-id-13107Comment by Ivan Andrus for <p>I'm having the same problem. When I entered
/Applications/Sage-4.7.2-OSX-64bit-10.6.app/Contents/Resources/sage/sage -c "print os.getenv('PATH')"</p>
<p>I get </p>
<p>'import site' failed; use -v for traceback
Traceback (most recent call last):
File "/Applications/Sage-4.7.2-OSX-64bit-10.6.app/Contents/Resources/sage/local/bin/sage-location", line 3, in <module>
import os, sys
ImportError: No module named os</p>
http://ask.sagemath.org/question/8531/install-problem-app-on-mac-os-x/?comment=20485#post-id-20485Sorry. I don't know why I thought that `sage -c` would work since sage can't start up. What you should try is `.../sage -sh` then `env | grep SAGE` and `echo $PATH`.Thu, 19 Jan 2012 21:39:54 -0600http://ask.sagemath.org/question/8531/install-problem-app-on-mac-os-x/?comment=20485#post-id-20485