# sage doesn't load properly in mac osx 10.7.1 (Lion)

How do I get sage to load properly on a Macbook Pro, OSX 10.7.1 (Lion), 2.26 GHz Intel Core 2 duo, 2 GB 1067 MHz DDR3? Terminal log follows:

```
Last login: Sun Oct 9 11:03:19 on ttys000
mth-pe201g-mac02:~ angel1jr$ cd ..
mth-pe201g-mac02:Users angel1jr$ cd ..
mth-pe201g-mac02:/ angel1jr$ ls
Applications discreteharvestingreport
FinalReport_726_pm etc
Library home
Network mach_kernel
System mathworks_downloads
User Guides And Information net
Users private
Volumes sbin
bin tmp
cores usr
dev var
mth-pe201g-mac02:/ angel1jr$ cd Applications
mth-pe201g-mac02:Applications angel1jr$ cd sage
mth-pe201g-mac02:sage angel1jr$ ls
COPYING.txt README.txt devel ipython sage
Makefile data examples local spkg
mth-pe201g-mac02:sage angel1jr$ ./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.
---------------------------------------------------------------------------
OSError Traceback (most recent call last)
/Applications/sage/local/bin/<string> in <module>()
/Applications/sage/local/lib/python2.6/site-packages/sage/misc/preparser_ipython.py in <module>()
6 ###########################################################################
7
----> 8 import sage.misc.interpreter
9
10 import preparser
/Applications/sage/local/lib/python2.6/site-packages/sage/misc/interpreter.py in <module>()
100
101 import os
--> 102 import log
103 import re
104
/Applications/sage/local/lib/python2.6/site-packages/sage/misc/log.py in <module>()
63
64 import interpreter
---> 65 import latex
66 import misc
67
/Applications/sage/local/lib/python2.6/site-packages/sage/misc/latex.py in <module>()
37 import subprocess
38
---> 39 from misc import tmp_dir, graphics_filename
40 import sage_eval
41 from sage.misc.misc import SAGE_DOC
/Applications/sage/local/lib/python2.6/site-packages/sage/misc/misc.py in <module>()
102 print "Setting permissions of DOT_SAGE directory so only you can read and write it."
103 # Change mode of DOT_SAGE.
--> 104 os.chmod(DOT_SAGE, _desired_mode)
105
106
OSError: [Errno 1] Operation not permitted: '/Users/angel1jr/.sage/'
WARNING: Failure executing code: 'import sage.misc.preparser_ipython; sage.misc.preparser_ipython.magma_colon_equals=True'
Setting permissions of DOT_SAGE directory so only you can read and write it.
---------------------------------------------------------------------------
OSError Traceback (most recent call last)
/Applications/sage/local/lib/python2.6/site-packages/IPython/ipmaker.pyc in force_import(modname)
64 reload(sys.modules[modname])
65 else:
---> 66 __import__(modname)
67
68
/Applications/sage/local/bin/ipy_profile_sage.py in <module>()
1 import os
2 if 'SAGE_CLEAN' not in os.environ:
----> 3 import sage.misc.misc
4 from sage.misc.interpreter import preparser, _ip
5 preparser(True)
/Applications/sage/local/lib/python2.6/site-packages/sage/misc/misc.py in <module>()
102 print "Setting permissions of DOT_SAGE directory so only you can read and write it."
103 # Change mode of DOT_SAGE.
--> 104 os.chmod(DOT_SAGE, _desired_mode)
105
106
OSError: [Errno 1] Operation not permitted: '/Users/angel1jr/.sage/'
Error importing ipy_profile_sage - perhaps you should run %upgrade?
WARNING: Loading of ipy_profile_sage failed.
<ERROR: name 'sage_prompt' is not defined>
```

I think that http://ask.sagemath.org/question/740/app-installation-problem-on-mac-os-x-lion might have some helpful ideas. I'm really not sure why this happens, unfortunately.