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.Fri, 22 Feb 2013 15:08:59 -0600app installation problem on mac os x lionhttp://ask.sagemath.org/question/8309/app-installation-problem-on-mac-os-x-lion/
I downloaded the 64-bit app version of Sage today, then dragged the app to my Applications folder. When I tried to open it, I got the following message in Terminal. I am new to the Mac OS and would appreciate any suggestions/directions!
------------------------------------
Last login: Thu Sep 8 15:07:04 on ttys001
LSLaptop:~ lrs$ '/Applications/Sage-4.7.1-OSX-64bit-10.6.app/Contents/Resources/sage/'/sage --notebook
Traceback (most recent call last):
File "/Applications/Sage-4.7.1-OSX-64bit-10.6.app/Contents/Resources/sage//local/bin/sage-notebook", line 3, in <module>
import os, sys, socket
File "/Applications/Sage-4.7.1-OSX-64bit-10.6.app/Contents/Resources/sage/local/lib/python/socket.py", line 46, in <module>
import _socket
ImportError: No module named _socketThu, 08 Sep 2011 10:35:30 -0500http://ask.sagemath.org/question/8309/app-installation-problem-on-mac-os-x-lion/Answer by niles for <p>I downloaded the 64-bit app version of Sage today, then dragged the app to my Applications folder. When I tried to open it, I got the following message in Terminal. I am new to the Mac OS and would appreciate any suggestions/directions! </p>
<hr/>
<pre><code>Last login: Thu Sep 8 15:07:04 on ttys001
LSLaptop:~ lrs$ '/Applications/Sage-4.7.1-OSX-64bit-10.6.app/Contents/Resources/sage/'/sage --notebook
Traceback (most recent call last):
File "/Applications/Sage-4.7.1-OSX-64bit-10.6.app/Contents/Resources/sage//local/bin/sage-notebook", line 3, in <module>
import os, sys, socket
File "/Applications/Sage-4.7.1-OSX-64bit-10.6.app/Contents/Resources/sage/local/lib/python/socket.py", line 46, in <module>
import _socket
ImportError: No module named _socket
</code></pre>
http://ask.sagemath.org/question/8309/app-installation-problem-on-mac-os-x-lion/?answer=12632#post-id-12632There are known problems with Sage on Lion, but the Sage binary compiled for Snow Leopard (Mac OS 10.6) has been reported to work on Lion.
However, there may be an incompatibility with the `.app` wrapper instead of the underlying Sage program . . . can you let us know the result of opening Sage on the command line? Try opening the Terminal (Applications -> Utilities -> Terminal) and pasting in the following:
/Applications/Sage-4.7.1-OSX-64bit-10.6.app/Contents/Resources/sage/sage
Does that give you a "`sage: `" prompt, or result in more errors?
-----
Updates: Ok; @jholtzman, it looks like you are having trouble with iPython; I'm not sure why. Which version of Sage did you install?
@Louisa Grey, it looks like you're getting the expected output; does the notebook start when you type "`notebook()`" at the "`sage:`" prompt? If so, I would say that Sage is working, but the `.app` wrapper is not.Thu, 08 Sep 2011 15:07:16 -0500http://ask.sagemath.org/question/8309/app-installation-problem-on-mac-os-x-lion/?answer=12632#post-id-12632Comment by jholtzman for <p>There are known problems with Sage on Lion, but the Sage binary compiled for Snow Leopard (Mac OS 10.6) has been reported to work on Lion.</p>
<p>However, there may be an incompatibility with the <code>.app</code> wrapper instead of the underlying Sage program . . . can you let us know the result of opening Sage on the command line? Try opening the Terminal (Applications -> Utilities -> Terminal) and pasting in the following:</p>
<pre><code>/Applications/Sage-4.7.1-OSX-64bit-10.6.app/Contents/Resources/sage/sage
</code></pre>
<p>Does that give you a "<code>sage:</code>" prompt, or result in more errors?</p>
<hr/>
<p>Updates: Ok; <a href="/users/474/jholtzman/">@jholtzman</a>, it looks like you are having trouble with iPython; I'm not sure why. Which version of Sage did you install?</p>
<p><a href="/users/471/louisa-grey/">@Louisa Grey</a>, it looks like you're getting the expected output; does the notebook start when you type "<code>notebook()</code>" at the "<code>sage:</code>" prompt? If so, I would say that Sage is working, but the <code>.app</code> wrapper is not.</p>
http://ask.sagemath.org/question/8309/app-installation-problem-on-mac-os-x-lion/?comment=21271#post-id-21271That command produces the following result:
----------------------------------------------------------------------
| Sage Version 4.7.1, Release Date: 2011-08-11 |
| Type notebook() for the GUI, and license() for information. |
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Applications/Sage-4.7.1-OSX-64bit-10.6.app/Contents/Resources/sage//local/bin/sage-ipython", line 18, in <module>
import IPython
ImportError: No module named IPythonSat, 10 Sep 2011 07:59:11 -0500http://ask.sagemath.org/question/8309/app-installation-problem-on-mac-os-x-lion/?comment=21271#post-id-21271Comment by Ivan Andrus for <p>There are known problems with Sage on Lion, but the Sage binary compiled for Snow Leopard (Mac OS 10.6) has been reported to work on Lion.</p>
<p>However, there may be an incompatibility with the <code>.app</code> wrapper instead of the underlying Sage program . . . can you let us know the result of opening Sage on the command line? Try opening the Terminal (Applications -> Utilities -> Terminal) and pasting in the following:</p>
<pre><code>/Applications/Sage-4.7.1-OSX-64bit-10.6.app/Contents/Resources/sage/sage
</code></pre>
<p>Does that give you a "<code>sage:</code>" prompt, or result in more errors?</p>
<hr/>
<p>Updates: Ok; <a href="/users/474/jholtzman/">@jholtzman</a>, it looks like you are having trouble with iPython; I'm not sure why. Which version of Sage did you install?</p>
<p><a href="/users/471/louisa-grey/">@Louisa Grey</a>, it looks like you're getting the expected output; does the notebook start when you type "<code>notebook()</code>" at the "<code>sage:</code>" prompt? If so, I would say that Sage is working, but the <code>.app</code> wrapper is not.</p>
http://ask.sagemath.org/question/8309/app-installation-problem-on-mac-os-x-lion/?comment=20880#post-id-20880@Loisa Can you run `/Applications/Sage-4.7.1-OSX-64bit-10.6.app/Contents/Resources/start-sage.sh /Applications/Sage-4.7.1-OSX-64bit-10.6.app/Contents/Resources/sage/sage ~/sageapp.log` since that's a script used by the app to actually start sage. That will help narrow down the problem.Thu, 17 Nov 2011 03:58:32 -0600http://ask.sagemath.org/question/8309/app-installation-problem-on-mac-os-x-lion/?comment=20880#post-id-20880Comment by kcrisman for <p>There are known problems with Sage on Lion, but the Sage binary compiled for Snow Leopard (Mac OS 10.6) has been reported to work on Lion.</p>
<p>However, there may be an incompatibility with the <code>.app</code> wrapper instead of the underlying Sage program . . . can you let us know the result of opening Sage on the command line? Try opening the Terminal (Applications -> Utilities -> Terminal) and pasting in the following:</p>
<pre><code>/Applications/Sage-4.7.1-OSX-64bit-10.6.app/Contents/Resources/sage/sage
</code></pre>
<p>Does that give you a "<code>sage:</code>" prompt, or result in more errors?</p>
<hr/>
<p>Updates: Ok; <a href="/users/474/jholtzman/">@jholtzman</a>, it looks like you are having trouble with iPython; I'm not sure why. Which version of Sage did you install?</p>
<p><a href="/users/471/louisa-grey/">@Louisa Grey</a>, it looks like you're getting the expected output; does the notebook start when you type "<code>notebook()</code>" at the "<code>sage:</code>" prompt? If so, I would say that Sage is working, but the <code>.app</code> wrapper is not.</p>
http://ask.sagemath.org/question/8309/app-installation-problem-on-mac-os-x-lion/?comment=21269#post-id-21269Huh. That's not a good sign, though at least it's not the app. Would you be able to try the 32-bit version for Snow Leopard (if there is one)? I realize that's a little much to ask. Sat, 10 Sep 2011 14:46:04 -0500http://ask.sagemath.org/question/8309/app-installation-problem-on-mac-os-x-lion/?comment=21269#post-id-21269Comment by Louisa Grey for <p>There are known problems with Sage on Lion, but the Sage binary compiled for Snow Leopard (Mac OS 10.6) has been reported to work on Lion.</p>
<p>However, there may be an incompatibility with the <code>.app</code> wrapper instead of the underlying Sage program . . . can you let us know the result of opening Sage on the command line? Try opening the Terminal (Applications -> Utilities -> Terminal) and pasting in the following:</p>
<pre><code>/Applications/Sage-4.7.1-OSX-64bit-10.6.app/Contents/Resources/sage/sage
</code></pre>
<p>Does that give you a "<code>sage:</code>" prompt, or result in more errors?</p>
<hr/>
<p>Updates: Ok; <a href="/users/474/jholtzman/">@jholtzman</a>, it looks like you are having trouble with iPython; I'm not sure why. Which version of Sage did you install?</p>
<p><a href="/users/471/louisa-grey/">@Louisa Grey</a>, it looks like you're getting the expected output; does the notebook start when you type "<code>notebook()</code>" at the "<code>sage:</code>" prompt? If so, I would say that Sage is working, but the <code>.app</code> wrapper is not.</p>
http://ask.sagemath.org/question/8309/app-installation-problem-on-mac-os-x-lion/?comment=21267#post-id-21267Thank you so much for your help. On my machine I did get a "sage:" prompt (after some other text, pasted below) & was then able to start the notebook, so it looks like I'm good to go. If there's anything else you would like me to try/ any info you want me to send, I'd be glad to help-
LSLaptop:~ lrs$ /Applications/Sage-4.7.1-OSX-64bit-10.6.app/Contents/Resources/sage/sage
----------------------------------------------------------------------
| Sage Version 4.7.1, Release Date: 2011-08-11 |
| Type notebook() for the GUI, and license() for information. |
----------------------------------------------------------------------
Setting permissions of DOT_SAGE directory so only you can read and write it.
sage:
Sun, 11 Sep 2011 11:49:10 -0500http://ask.sagemath.org/question/8309/app-installation-problem-on-mac-os-x-lion/?comment=21267#post-id-21267Comment by Louisa Grey for <p>There are known problems with Sage on Lion, but the Sage binary compiled for Snow Leopard (Mac OS 10.6) has been reported to work on Lion.</p>
<p>However, there may be an incompatibility with the <code>.app</code> wrapper instead of the underlying Sage program . . . can you let us know the result of opening Sage on the command line? Try opening the Terminal (Applications -> Utilities -> Terminal) and pasting in the following:</p>
<pre><code>/Applications/Sage-4.7.1-OSX-64bit-10.6.app/Contents/Resources/sage/sage
</code></pre>
<p>Does that give you a "<code>sage:</code>" prompt, or result in more errors?</p>
<hr/>
<p>Updates: Ok; <a href="/users/474/jholtzman/">@jholtzman</a>, it looks like you are having trouble with iPython; I'm not sure why. Which version of Sage did you install?</p>
<p><a href="/users/471/louisa-grey/">@Louisa Grey</a>, it looks like you're getting the expected output; does the notebook start when you type "<code>notebook()</code>" at the "<code>sage:</code>" prompt? If so, I would say that Sage is working, but the <code>.app</code> wrapper is not.</p>
http://ask.sagemath.org/question/8309/app-installation-problem-on-mac-os-x-lion/?comment=21263#post-id-21263@niles, the notebook did start when I typed notebook() at the sage: prompt. Now I just have to learn how to use it :)Mon, 12 Sep 2011 02:44:34 -0500http://ask.sagemath.org/question/8309/app-installation-problem-on-mac-os-x-lion/?comment=21263#post-id-21263Answer by richard for <p>I downloaded the 64-bit app version of Sage today, then dragged the app to my Applications folder. When I tried to open it, I got the following message in Terminal. I am new to the Mac OS and would appreciate any suggestions/directions! </p>
<hr/>
<pre><code>Last login: Thu Sep 8 15:07:04 on ttys001
LSLaptop:~ lrs$ '/Applications/Sage-4.7.1-OSX-64bit-10.6.app/Contents/Resources/sage/'/sage --notebook
Traceback (most recent call last):
File "/Applications/Sage-4.7.1-OSX-64bit-10.6.app/Contents/Resources/sage//local/bin/sage-notebook", line 3, in <module>
import os, sys, socket
File "/Applications/Sage-4.7.1-OSX-64bit-10.6.app/Contents/Resources/sage/local/lib/python/socket.py", line 46, in <module>
import _socket
ImportError: No module named _socket
</code></pre>
http://ask.sagemath.org/question/8309/app-installation-problem-on-mac-os-x-lion/?answer=13016#post-id-13016I had the same problem. I installed Xcode and the latest python 2.7. It still didn't work until I did a manual run with
/Applications/Sage-4.7.2-OSX-64bit-10.6.app/Contents/Resources/sage/sage
Now it works fine with the app or with automatic startup. I don't know if it needed Xcode or new Python or if the manual start was enough to get it working.Wed, 14 Dec 2011 22:21:23 -0600http://ask.sagemath.org/question/8309/app-installation-problem-on-mac-os-x-lion/?answer=13016#post-id-13016Comment by kcrisman for <p>I had the same problem. I installed Xcode and the latest python 2.7. It still didn't work until I did a manual run with</p>
<p>/Applications/Sage-4.7.2-OSX-64bit-10.6.app/Contents/Resources/sage/sage</p>
<p>Now it works fine with the app or with automatic startup. I don't know if it needed Xcode or new Python or if the manual start was enough to get it working.</p>
http://ask.sagemath.org/question/8309/app-installation-problem-on-mac-os-x-lion/?comment=20706#post-id-20706Those things shouldn't matter, assuming that you didn't actually *use* Xcode or the system Python (say, to build something). Strange that one of the other comments found this helped...Thu, 15 Dec 2011 06:17:52 -0600http://ask.sagemath.org/question/8309/app-installation-problem-on-mac-os-x-lion/?comment=20706#post-id-20706Answer by tellif for <p>I downloaded the 64-bit app version of Sage today, then dragged the app to my Applications folder. When I tried to open it, I got the following message in Terminal. I am new to the Mac OS and would appreciate any suggestions/directions! </p>
<hr/>
<pre><code>Last login: Thu Sep 8 15:07:04 on ttys001
LSLaptop:~ lrs$ '/Applications/Sage-4.7.1-OSX-64bit-10.6.app/Contents/Resources/sage/'/sage --notebook
Traceback (most recent call last):
File "/Applications/Sage-4.7.1-OSX-64bit-10.6.app/Contents/Resources/sage//local/bin/sage-notebook", line 3, in <module>
import os, sys, socket
File "/Applications/Sage-4.7.1-OSX-64bit-10.6.app/Contents/Resources/sage/local/lib/python/socket.py", line 46, in <module>
import _socket
ImportError: No module named _socket
</code></pre>
http://ask.sagemath.org/question/8309/app-installation-problem-on-mac-os-x-lion/?answer=11812#post-id-11812I had the same problem on lion (2011 MBA). I fixed it by going to python's website, downloading, and installing the latest version, as the base version of python installed on OSX is very far behind. Hope this helps!Wed, 23 Nov 2011 18:58:29 -0600http://ask.sagemath.org/question/8309/app-installation-problem-on-mac-os-x-lion/?answer=11812#post-id-11812Answer by brunoh for <p>I downloaded the 64-bit app version of Sage today, then dragged the app to my Applications folder. When I tried to open it, I got the following message in Terminal. I am new to the Mac OS and would appreciate any suggestions/directions! </p>
<hr/>
<pre><code>Last login: Thu Sep 8 15:07:04 on ttys001
LSLaptop:~ lrs$ '/Applications/Sage-4.7.1-OSX-64bit-10.6.app/Contents/Resources/sage/'/sage --notebook
Traceback (most recent call last):
File "/Applications/Sage-4.7.1-OSX-64bit-10.6.app/Contents/Resources/sage//local/bin/sage-notebook", line 3, in <module>
import os, sys, socket
File "/Applications/Sage-4.7.1-OSX-64bit-10.6.app/Contents/Resources/sage/local/lib/python/socket.py", line 46, in <module>
import _socket
ImportError: No module named _socket
</code></pre>
http://ask.sagemath.org/question/8309/app-installation-problem-on-mac-os-x-lion/?answer=12759#post-id-12759I had exactly the same problem than@Louisa Grey with the "no module named _socket"
I found the following solution :
1- install the 2.7 version of Python for OSX
2- go into the easy_install directory and type "sudo easy_install-2.7 iPython" in a Terminal bash
3- again in the same Terminal session, type "sudo easy_install readline"
then it worked fineSun, 15 Jan 2012 07:19:16 -0600http://ask.sagemath.org/question/8309/app-installation-problem-on-mac-os-x-lion/?answer=12759#post-id-12759Comment by MonsieurDart for <p>I had exactly the same problem than@Louisa Grey with the "no module named _socket"</p>
<p>I found the following solution :</p>
<p>1- install the 2.7 version of Python for OSX</p>
<p>2- go into the easy_install directory and type "sudo easy_install-2.7 iPython" in a Terminal bash</p>
<p>3- again in the same Terminal session, type "sudo easy_install readline"</p>
<p>then it worked fine</p>
http://ask.sagemath.org/question/8309/app-installation-problem-on-mac-os-x-lion/?comment=20284#post-id-20284Worked for me with the latest version of Python and just running: "sudo easy_install iPython" and then "sudo easy_install readline".Wed, 15 Feb 2012 04:38:43 -0600http://ask.sagemath.org/question/8309/app-installation-problem-on-mac-os-x-lion/?comment=20284#post-id-20284Answer by Dima for <p>I downloaded the 64-bit app version of Sage today, then dragged the app to my Applications folder. When I tried to open it, I got the following message in Terminal. I am new to the Mac OS and would appreciate any suggestions/directions! </p>
<hr/>
<pre><code>Last login: Thu Sep 8 15:07:04 on ttys001
LSLaptop:~ lrs$ '/Applications/Sage-4.7.1-OSX-64bit-10.6.app/Contents/Resources/sage/'/sage --notebook
Traceback (most recent call last):
File "/Applications/Sage-4.7.1-OSX-64bit-10.6.app/Contents/Resources/sage//local/bin/sage-notebook", line 3, in <module>
import os, sys, socket
File "/Applications/Sage-4.7.1-OSX-64bit-10.6.app/Contents/Resources/sage/local/lib/python/socket.py", line 46, in <module>
import _socket
ImportError: No module named _socket
</code></pre>
http://ask.sagemath.org/question/8309/app-installation-problem-on-mac-os-x-lion/?answer=12920#post-id-12920just to confirm, does a non-app version of Sage, i.e.
sage-4.7.2-OSX-64bit-10.6-x86_64-Darwin.dmg
work for you?
My understanding is that it should work. The only inconvenience is that you have to start it from Terminal...Fri, 18 Nov 2011 16:29:15 -0600http://ask.sagemath.org/question/8309/app-installation-problem-on-mac-os-x-lion/?answer=12920#post-id-12920Comment by sam_roberson for <p>just to confirm, does a non-app version of Sage, i.e.
sage-4.7.2-OSX-64bit-10.6-x86_64-Darwin.dmg
work for you?
My understanding is that it should work. The only inconvenience is that you have to start it from Terminal...</p>
http://ask.sagemath.org/question/8309/app-installation-problem-on-mac-os-x-lion/?comment=20272#post-id-20272you can also make a handy app using automator to run the following shell script: "/Applications/sage/sage -notebook". That way you can run sage from the FinderMon, 20 Feb 2012 18:02:34 -0600http://ask.sagemath.org/question/8309/app-installation-problem-on-mac-os-x-lion/?comment=20272#post-id-20272Answer by michaelhund for <p>I downloaded the 64-bit app version of Sage today, then dragged the app to my Applications folder. When I tried to open it, I got the following message in Terminal. I am new to the Mac OS and would appreciate any suggestions/directions! </p>
<hr/>
<pre><code>Last login: Thu Sep 8 15:07:04 on ttys001
LSLaptop:~ lrs$ '/Applications/Sage-4.7.1-OSX-64bit-10.6.app/Contents/Resources/sage/'/sage --notebook
Traceback (most recent call last):
File "/Applications/Sage-4.7.1-OSX-64bit-10.6.app/Contents/Resources/sage//local/bin/sage-notebook", line 3, in <module>
import os, sys, socket
File "/Applications/Sage-4.7.1-OSX-64bit-10.6.app/Contents/Resources/sage/local/lib/python/socket.py", line 46, in <module>
import _socket
ImportError: No module named _socket
</code></pre>
http://ask.sagemath.org/question/8309/app-installation-problem-on-mac-os-x-lion/?answer=12909#post-id-12909I am having precisely these problems also. I'm new to Sage, looking forward to learning how to use it.
Using the Sage-4.7.2-OSX-64bit-10.6.app binaries on Lion 10.7.2, with xcode 4.2, the latest iPython (32 I think), I'm able to get sage to start, with menus. The terminal shows the errors noted above. No sage prompt. When I try to open the notebook, I get the error "could not connect to localhost:8000" which I'm presuming means the server did not start.
I was considering trying to build it myself, but I've looked at the build problems in http://trac.sagemath.org/sage_trac/ticket/11881, and I think I'll just wait to see how it goes, obviously there are a lot of little hidden nasties in the new versions of OS X and xcode to deal with.
Kind Regards,
Michael HundWed, 16 Nov 2011 11:59:34 -0600http://ask.sagemath.org/question/8309/app-installation-problem-on-mac-os-x-lion/?answer=12909#post-id-12909Comment by HHammond for <p>I am having precisely these problems also. I'm new to Sage, looking forward to learning how to use it. </p>
<p>Using the Sage-4.7.2-OSX-64bit-10.6.app binaries on Lion 10.7.2, with xcode 4.2, the latest iPython (32 I think), I'm able to get sage to start, with menus. The terminal shows the errors noted above. No sage prompt. When I try to open the notebook, I get the error "could not connect to localhost:8000" which I'm presuming means the server did not start.</p>
<p>I was considering trying to build it myself, but I've looked at the build problems in <a href="http://trac.sagemath.org/sage_trac/ticket/11881">http://trac.sagemath.org/sage_trac/ti...</a>, and I think I'll just wait to see how it goes, obviously there are a lot of little hidden nasties in the new versions of OS X and xcode to deal with.</p>
<p>Kind Regards,
Michael Hund</p>
http://ask.sagemath.org/question/8309/app-installation-problem-on-mac-os-x-lion/?comment=18211#post-id-18211You can fix the localhost:8000 notebook error by opening up /Sage/devel/ext/sage/ext/mac-app/Sage.xcodeproj in XCode, opening file AppController.m and changing line 61 from 'port=8000' to 'port=8080', then recompiling and moving /Sage/devel/ext/sage/ext/mac-app/build/Debug/Sage.app (or /Release if you speficied that in XCode) to your applications folder.Tue, 19 Feb 2013 14:37:56 -0600http://ask.sagemath.org/question/8309/app-installation-problem-on-mac-os-x-lion/?comment=18211#post-id-18211Answer by Bruce Edge for <p>I downloaded the 64-bit app version of Sage today, then dragged the app to my Applications folder. When I tried to open it, I got the following message in Terminal. I am new to the Mac OS and would appreciate any suggestions/directions! </p>
<hr/>
<pre><code>Last login: Thu Sep 8 15:07:04 on ttys001
LSLaptop:~ lrs$ '/Applications/Sage-4.7.1-OSX-64bit-10.6.app/Contents/Resources/sage/'/sage --notebook
Traceback (most recent call last):
File "/Applications/Sage-4.7.1-OSX-64bit-10.6.app/Contents/Resources/sage//local/bin/sage-notebook", line 3, in <module>
import os, sys, socket
File "/Applications/Sage-4.7.1-OSX-64bit-10.6.app/Contents/Resources/sage/local/lib/python/socket.py", line 46, in <module>
import _socket
ImportError: No module named _socket
</code></pre>
http://ask.sagemath.org/question/8309/app-installation-problem-on-mac-os-x-lion/?answer=13061#post-id-13061Found the problem with the "RuntimeError: no available port." issue.
The key is:
------------------------------------------------------------
File "<ipython console>", line 1
b Integer(134)
^
SyntaxError: invalid syntax
The mac version, for whatever reason is expecting the port arg as a string, not an int.
This works:
sage: notebook(port="8000")
Note the quotes around the port number.
Fri, 23 Dec 2011 04:08:10 -0600http://ask.sagemath.org/question/8309/app-installation-problem-on-mac-os-x-lion/?answer=13061#post-id-13061Answer by tellif for <p>I downloaded the 64-bit app version of Sage today, then dragged the app to my Applications folder. When I tried to open it, I got the following message in Terminal. I am new to the Mac OS and would appreciate any suggestions/directions! </p>
<hr/>
<pre><code>Last login: Thu Sep 8 15:07:04 on ttys001
LSLaptop:~ lrs$ '/Applications/Sage-4.7.1-OSX-64bit-10.6.app/Contents/Resources/sage/'/sage --notebook
Traceback (most recent call last):
File "/Applications/Sage-4.7.1-OSX-64bit-10.6.app/Contents/Resources/sage//local/bin/sage-notebook", line 3, in <module>
import os, sys, socket
File "/Applications/Sage-4.7.1-OSX-64bit-10.6.app/Contents/Resources/sage/local/lib/python/socket.py", line 46, in <module>
import _socket
ImportError: No module named _socket
</code></pre>
http://ask.sagemath.org/question/8309/app-installation-problem-on-mac-os-x-lion/?answer=11950#post-id-11950I had the same problem on lion (2011 MBA). I fixed it by going to python's website, downloading, and installing the latest version of python, as the base version of python installed on OSX is very far behind. Hope this helps!Wed, 23 Nov 2011 18:58:59 -0600http://ask.sagemath.org/question/8309/app-installation-problem-on-mac-os-x-lion/?answer=11950#post-id-11950Answer by Charlie Martin for <p>I downloaded the 64-bit app version of Sage today, then dragged the app to my Applications folder. When I tried to open it, I got the following message in Terminal. I am new to the Mac OS and would appreciate any suggestions/directions! </p>
<hr/>
<pre><code>Last login: Thu Sep 8 15:07:04 on ttys001
LSLaptop:~ lrs$ '/Applications/Sage-4.7.1-OSX-64bit-10.6.app/Contents/Resources/sage/'/sage --notebook
Traceback (most recent call last):
File "/Applications/Sage-4.7.1-OSX-64bit-10.6.app/Contents/Resources/sage//local/bin/sage-notebook", line 3, in <module>
import os, sys, socket
File "/Applications/Sage-4.7.1-OSX-64bit-10.6.app/Contents/Resources/sage/local/lib/python/socket.py", line 46, in <module>
import _socket
ImportError: No module named _socket
</code></pre>
http://ask.sagemath.org/question/8309/app-installation-problem-on-mac-os-x-lion/?answer=12679#post-id-12679Folks, I've had a similar problem. Downloaded the Sage.app, tried launching it, then (as suggested here) tried launching from the command line. Here are the results:
209 $ /Applications/Sage-4.7.1-OSX-64bit-10.6.app/Contents/Resources/sage/sage
----------------------------------------------------------------------
| Sage Version 4.7.1, Release Date: 2011-08-11 |
| Type notebook() for the GUI, and license() for information. |
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Volumes/sage-4.7.1-OSX-64bit-10.6-x86_64-Darwin/Sage-4.7.1-OSX-64bit-10.6.app/Contents/Resources/sage//local/bin/sage-ipython", line 18, in <module>
import IPython
ImportError: No module named IPython
210 $
iPython is installed in my normal Python world.Wed, 21 Sep 2011 18:10:06 -0500http://ask.sagemath.org/question/8309/app-installation-problem-on-mac-os-x-lion/?answer=12679#post-id-12679Comment by HHammond for <p>Folks, I've had a similar problem. Downloaded the Sage.app, tried launching it, then (as suggested here) tried launching from the command line. Here are the results:</p>
<pre><code>209 $ /Applications/Sage-4.7.1-OSX-64bit-10.6.app/Contents/Resources/sage/sage
----------------------------------------------------------------------
| Sage Version 4.7.1, Release Date: 2011-08-11 |
| Type notebook() for the GUI, and license() for information. |
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Volumes/sage-4.7.1-OSX-64bit-10.6-x86_64-Darwin/Sage-4.7.1-OSX-64bit-10.6.app/Contents/Resources/sage//local/bin/sage-ipython", line 18, in <module>
import IPython
ImportError: No module named IPython
210 $
</code></pre>
<p>iPython is installed in my normal Python world.</p>
http://ask.sagemath.org/question/8309/app-installation-problem-on-mac-os-x-lion/?comment=18200#post-id-18200I'm not sure why iPython isn't working. I can't replicate the issue, but running 'sudo easy_install ipython' followed by 'sudo easy_install readline' may resolve the issueThu, 21 Feb 2013 10:42:24 -0600http://ask.sagemath.org/question/8309/app-installation-problem-on-mac-os-x-lion/?comment=18200#post-id-18200Comment by Andrew Francis for <p>Folks, I've had a similar problem. Downloaded the Sage.app, tried launching it, then (as suggested here) tried launching from the command line. Here are the results:</p>
<pre><code>209 $ /Applications/Sage-4.7.1-OSX-64bit-10.6.app/Contents/Resources/sage/sage
----------------------------------------------------------------------
| Sage Version 4.7.1, Release Date: 2011-08-11 |
| Type notebook() for the GUI, and license() for information. |
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Volumes/sage-4.7.1-OSX-64bit-10.6-x86_64-Darwin/Sage-4.7.1-OSX-64bit-10.6.app/Contents/Resources/sage//local/bin/sage-ipython", line 18, in <module>
import IPython
ImportError: No module named IPython
210 $
</code></pre>
<p>iPython is installed in my normal Python world.</p>
http://ask.sagemath.org/question/8309/app-installation-problem-on-mac-os-x-lion/?comment=21113#post-id-21113Just confirming this story if it helps. I did exactly as Charlie Martin has done with exactly the same results. I am working on new hardware (Macbook Air running OSX10.7) so this is a fresh factory install of OSX, not an upgrade.Mon, 17 Oct 2011 09:50:38 -0500http://ask.sagemath.org/question/8309/app-installation-problem-on-mac-os-x-lion/?comment=21113#post-id-21113Comment by Dima for <p>Folks, I've had a similar problem. Downloaded the Sage.app, tried launching it, then (as suggested here) tried launching from the command line. Here are the results:</p>
<pre><code>209 $ /Applications/Sage-4.7.1-OSX-64bit-10.6.app/Contents/Resources/sage/sage
----------------------------------------------------------------------
| Sage Version 4.7.1, Release Date: 2011-08-11 |
| Type notebook() for the GUI, and license() for information. |
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Volumes/sage-4.7.1-OSX-64bit-10.6-x86_64-Darwin/Sage-4.7.1-OSX-64bit-10.6.app/Contents/Resources/sage//local/bin/sage-ipython", line 18, in <module>
import IPython
ImportError: No module named IPython
210 $
</code></pre>
<p>iPython is installed in my normal Python world.</p>
http://ask.sagemath.org/question/8309/app-installation-problem-on-mac-os-x-lion/?comment=20865#post-id-20865Sage supplies its own instance of ipython. So you don't need to have it installed separately.Fri, 18 Nov 2011 16:25:53 -0600http://ask.sagemath.org/question/8309/app-installation-problem-on-mac-os-x-lion/?comment=20865#post-id-20865Comment by kcrisman for <p>Folks, I've had a similar problem. Downloaded the Sage.app, tried launching it, then (as suggested here) tried launching from the command line. Here are the results:</p>
<pre><code>209 $ /Applications/Sage-4.7.1-OSX-64bit-10.6.app/Contents/Resources/sage/sage
----------------------------------------------------------------------
| Sage Version 4.7.1, Release Date: 2011-08-11 |
| Type notebook() for the GUI, and license() for information. |
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Volumes/sage-4.7.1-OSX-64bit-10.6-x86_64-Darwin/Sage-4.7.1-OSX-64bit-10.6.app/Contents/Resources/sage//local/bin/sage-ipython", line 18, in <module>
import IPython
ImportError: No module named IPython
210 $
</code></pre>
<p>iPython is installed in my normal Python world.</p>
http://ask.sagemath.org/question/8309/app-installation-problem-on-mac-os-x-lion/?comment=20864#post-id-20864Right, but why is his Sage ipython not importing?Sat, 19 Nov 2011 00:33:17 -0600http://ask.sagemath.org/question/8309/app-installation-problem-on-mac-os-x-lion/?comment=20864#post-id-20864Comment by sflammia for <p>Folks, I've had a similar problem. Downloaded the Sage.app, tried launching it, then (as suggested here) tried launching from the command line. Here are the results:</p>
<pre><code>209 $ /Applications/Sage-4.7.1-OSX-64bit-10.6.app/Contents/Resources/sage/sage
----------------------------------------------------------------------
| Sage Version 4.7.1, Release Date: 2011-08-11 |
| Type notebook() for the GUI, and license() for information. |
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Volumes/sage-4.7.1-OSX-64bit-10.6-x86_64-Darwin/Sage-4.7.1-OSX-64bit-10.6.app/Contents/Resources/sage//local/bin/sage-ipython", line 18, in <module>
import IPython
ImportError: No module named IPython
210 $
</code></pre>
<p>iPython is installed in my normal Python world.</p>
http://ask.sagemath.org/question/8309/app-installation-problem-on-mac-os-x-lion/?comment=20909#post-id-20909I am also experiencing the same difficulty.Mon, 14 Nov 2011 08:03:19 -0600http://ask.sagemath.org/question/8309/app-installation-problem-on-mac-os-x-lion/?comment=20909#post-id-20909Comment by kcrisman for <p>Folks, I've had a similar problem. Downloaded the Sage.app, tried launching it, then (as suggested here) tried launching from the command line. Here are the results:</p>
<pre><code>209 $ /Applications/Sage-4.7.1-OSX-64bit-10.6.app/Contents/Resources/sage/sage
----------------------------------------------------------------------
| Sage Version 4.7.1, Release Date: 2011-08-11 |
| Type notebook() for the GUI, and license() for information. |
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Volumes/sage-4.7.1-OSX-64bit-10.6-x86_64-Darwin/Sage-4.7.1-OSX-64bit-10.6.app/Contents/Resources/sage//local/bin/sage-ipython", line 18, in <module>
import IPython
ImportError: No module named IPython
210 $
</code></pre>
<p>iPython is installed in my normal Python world.</p>
http://ask.sagemath.org/question/8309/app-installation-problem-on-mac-os-x-lion/?comment=20881#post-id-20881This is all pretty weird. I've posted about this at http://groups.google.com/group/sage-devel/browse_thread/thread/6e2ce8ca9103eda2Wed, 16 Nov 2011 15:23:20 -0600http://ask.sagemath.org/question/8309/app-installation-problem-on-mac-os-x-lion/?comment=20881#post-id-20881Answer by PhGriffiths for <p>I downloaded the 64-bit app version of Sage today, then dragged the app to my Applications folder. When I tried to open it, I got the following message in Terminal. I am new to the Mac OS and would appreciate any suggestions/directions! </p>
<hr/>
<pre><code>Last login: Thu Sep 8 15:07:04 on ttys001
LSLaptop:~ lrs$ '/Applications/Sage-4.7.1-OSX-64bit-10.6.app/Contents/Resources/sage/'/sage --notebook
Traceback (most recent call last):
File "/Applications/Sage-4.7.1-OSX-64bit-10.6.app/Contents/Resources/sage//local/bin/sage-notebook", line 3, in <module>
import os, sys, socket
File "/Applications/Sage-4.7.1-OSX-64bit-10.6.app/Contents/Resources/sage/local/lib/python/socket.py", line 46, in <module>
import _socket
ImportError: No module named _socket
</code></pre>
http://ask.sagemath.org/question/8309/app-installation-problem-on-mac-os-x-lion/?answer=14582#post-id-14582Hi
I have installed the Sage 5.6 - OSX 10.6 on my Mac with OSX 10.7 Lion.
It works pretty well until I decide to use sagetex (with TeXShop).
And some problems arise:
1) I can't have the notebook anymore with safari (error message: 'can't connect to localhost:8000') while sage in the terminal works properly;
2) when I run the SageTest.sagetex.sage, I got this message:
File "/Users/janyphiphi/Library/TeXShop/Engines/Inactive/Sage/SageTest.sagetex.py", line 19, in <module>
_st_.endofdoc()
File "/Applications/Sage-5.6-OSX-64bit-10.6.app/Contents/Resources/sage/local/lib/python2.7/site-packages/sagetex.py", line 282, in endofdoc
sagef = open(self.filename + '.sagetex.sage', 'r')
IOError: [Errno 2] No such file or directory: 'SageTest.sagetex.sage'
logout
Any idea?
I'm french and beginner in terminal , python, and so on, so, be pretty, be clear, as far as possible!
Thanks a lotFri, 22 Feb 2013 12:45:56 -0600http://ask.sagemath.org/question/8309/app-installation-problem-on-mac-os-x-lion/?answer=14582#post-id-14582Comment by kcrisman for <p>Hi</p>
<p>I have installed the Sage 5.6 - OSX 10.6 on my Mac with OSX 10.7 Lion.
It works pretty well until I decide to use sagetex (with TeXShop).
And some problems arise:
1) I can't have the notebook anymore with safari (error message: 'can't connect to localhost:8000') while sage in the terminal works properly;
2) when I run the SageTest.sagetex.sage, I got this message: </p>
<p>File "/Users/janyphiphi/Library/TeXShop/Engines/Inactive/Sage/SageTest.sagetex.py", line 19, in <module>
_st_.endofdoc()
File "/Applications/Sage-5.6-OSX-64bit-10.6.app/Contents/Resources/sage/local/lib/python2.7/site-packages/sagetex.py", line 282, in endofdoc
sagef = open(self.filename + '.sagetex.sage', 'r')
IOError: [Errno 2] No such file or directory: 'SageTest.sagetex.sage'
logout</p>
<p>Any idea?</p>
<p>I'm french and beginner in terminal , python, and so on, so, be pretty, be clear, as far as possible!
Thanks a lot</p>
http://ask.sagemath.org/question/8309/app-installation-problem-on-mac-os-x-lion/?comment=18187#post-id-18187Hi, you probably will want to open a new question with this, as you are able to use Sage and the problems are different than those above. Just FYI, the notebook should now be using port 8080, but the automatic login should still be working... anyway, put more details on a new question, or on the sage-support mailing list! Good luck.Fri, 22 Feb 2013 15:08:59 -0600http://ask.sagemath.org/question/8309/app-installation-problem-on-mac-os-x-lion/?comment=18187#post-id-18187Answer by tellif for <p>I downloaded the 64-bit app version of Sage today, then dragged the app to my Applications folder. When I tried to open it, I got the following message in Terminal. I am new to the Mac OS and would appreciate any suggestions/directions! </p>
<hr/>
<pre><code>Last login: Thu Sep 8 15:07:04 on ttys001
LSLaptop:~ lrs$ '/Applications/Sage-4.7.1-OSX-64bit-10.6.app/Contents/Resources/sage/'/sage --notebook
Traceback (most recent call last):
File "/Applications/Sage-4.7.1-OSX-64bit-10.6.app/Contents/Resources/sage//local/bin/sage-notebook", line 3, in <module>
import os, sys, socket
File "/Applications/Sage-4.7.1-OSX-64bit-10.6.app/Contents/Resources/sage/local/lib/python/socket.py", line 46, in <module>
import _socket
ImportError: No module named _socket
</code></pre>
http://ask.sagemath.org/question/8309/app-installation-problem-on-mac-os-x-lion/?answer=12892#post-id-12892I had the same problem on lion (2011 MBA). I fixed it by going to python's website, downloading, and installing the latest version, as the base version of python installed on OSX is very far behind. Hope this helps!Wed, 23 Nov 2011 18:58:09 -0600http://ask.sagemath.org/question/8309/app-installation-problem-on-mac-os-x-lion/?answer=12892#post-id-12892Comment by kcrisman for <p>I had the same problem on lion (2011 MBA). I fixed it by going to python's website, downloading, and installing the latest version, as the base version of python installed on OSX is very far behind. Hope this helps!</p>
http://ask.sagemath.org/question/8309/app-installation-problem-on-mac-os-x-lion/?comment=20705#post-id-20705If you could tell us *exactly* what you did, that would be helpful. In principle, the system Python should be irrelevant, but maybe for the app it isn't?Thu, 15 Dec 2011 06:18:34 -0600http://ask.sagemath.org/question/8309/app-installation-problem-on-mac-os-x-lion/?comment=20705#post-id-20705Answer by Bruce Edge for <p>I downloaded the 64-bit app version of Sage today, then dragged the app to my Applications folder. When I tried to open it, I got the following message in Terminal. I am new to the Mac OS and would appreciate any suggestions/directions! </p>
<hr/>
<pre><code>Last login: Thu Sep 8 15:07:04 on ttys001
LSLaptop:~ lrs$ '/Applications/Sage-4.7.1-OSX-64bit-10.6.app/Contents/Resources/sage/'/sage --notebook
Traceback (most recent call last):
File "/Applications/Sage-4.7.1-OSX-64bit-10.6.app/Contents/Resources/sage//local/bin/sage-notebook", line 3, in <module>
import os, sys, socket
File "/Applications/Sage-4.7.1-OSX-64bit-10.6.app/Contents/Resources/sage/local/lib/python/socket.py", line 46, in <module>
import _socket
ImportError: No module named _socket
</code></pre>
http://ask.sagemath.org/question/8309/app-installation-problem-on-mac-os-x-lion/?answer=13059#post-id-13059Here's my Lion attempt:
1 %> /Applications/Sage-4.7.2-OSX-64bit-10.6.app/Contents/Resources/sage/sage
----------------------------------------------------------------------
| Sage Version 4.7.2, Release Date: 2011-10-29 |
| Type notebook() for the GUI, and license() for information. |
----------------------------------------------------------------------
sage: notebook()
The notebook files are stored in: sage_notebook.sagenb
ERROR: An unexpected error occurred while tokenizing input
The following traceback may be corrupted or invalid
The error message is: ('EOF in multi-line statement', (97, 0))
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
/Users/bedge/.sage/<ipython console> in <module>()
/Applications/Sage-4.7.2-OSX-64bit-10.6.app/Contents/Resources/sage/devel/sagenb/sagenb/notebook/notebook_object.pyc in __call__(self, *args, **kwds)
215 """
216 def __call__(self, *args, **kwds):
--> 217 return self.notebook(*args, **kwds)
218
219 notebook = run_notebook.notebook_twisted
/Applications/Sage-4.7.2-OSX-64bit-10.6.app/Contents/Resources/sage/devel/sagenb/sagenb/notebook/run_notebook.pyc in notebook_twisted(self, directory, port, interface, address, port_tries, secure, reset, accounts, require_login, server_pol, ulimit, timeout, open_viewer, sagetex_path, start_path, fork, quiet, subnets)
441 print "*" * 70
442
--> 443 port = find_next_available_port(interface, port, port_tries)
444 if open_viewer:
445 "Open viewer automatically isn't fully implemented. You have to manually open your web browser to the above URL."
/Applications/Sage-4.7.2-OSX-64bit-10.6.app/Contents/Resources/sage/devel/sagenb/sagenb/misc/misc.pyc in find_next_available_port(interface, start, max_tries, verbose)
132 print "Port %s is already in use."%port
133 print "Trying next port..."
--> 134 raise RuntimeError, "no available port."
135
136
RuntimeError: no available port.
sage:
Exiting Sage (CPU time 0m0.69s, Wall time 0m27.68s).
1 22:41:43 bedge@tmacc ~/personal/sage
and my python info:
0 %> python
Python 2.7.2 (default, Aug 11 2011, 14:59:27)
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> Thu, 22 Dec 2011 18:43:35 -0600http://ask.sagemath.org/question/8309/app-installation-problem-on-mac-os-x-lion/?answer=13059#post-id-13059