Ask Your Question

installation error

asked 2013-03-28 17:02:29 -0500

k1 gravatar image

updated 2013-03-29 13:42:24 -0500

I tried to install sage from source and also from PPA on Ubuntu 12.10. Both of them finish the installation without any problem, but when I run sage I get the following error:

k1@Think1:~$ sagemath

| Sage Version 5.8, Release Date: 2013-03-15 | | Type "notebook()" for the browser-based notebook interface. | | Type "help()" for help. |

/usr/lib/sagemath/local/lib/python2.7/site-packages/IPython/utils/ > UserWarning: IPython dir '/home/k1/.sage/ipython-0.12' is not a writable location, using a temp directory.

" using a temp directory."%ipdir)

Traceback (most recent call last):

File "/usr/lib/sagemath/local/bin/sage-ipython", line 14, in <module> app.initialize()

File "<string>", line 2, in initialize

File "/usr/lib/sagemath/local/lib/python2.7/site-packages/IPython/config/", line 84, in catch_config_error

return method(app, args, *kwargs)

File "/usr/lib/sagemath/local/lib/python2.7/site-packages/IPython/frontend/terminal/", line 313, in initialize

super(TerminalIPythonApp, self).initialize(argv)

File "<string>", line 2, in initialize

File "/usr/lib/sagemath/local/lib/python2.7/site-packages/IPython/config/", line 84, in catch_config_error

return method(app, args, *kwargs)

File "/usr/lib/sagemath/local/lib/python2.7/site-packages/IPython/core/", line 333, in initialize


File "/usr/lib/sagemath/local/lib/python2.7/site-packages/sage/misc/", line 693, in load_config_file

get_ipython_dir(), 'sage').location

File "/usr/lib/sagemath/local/lib/python2.7/site-packages/IPython/core/", line 209, in find_profile_dir_by_name

raise ProfileDirError('Profile directory not found in paths: %s' % dirname) ProfileDirError: Profile directory not found in paths: profile_sage

If you suspect this is an IPython bug, please report it at: or send an email to the mailing list at

You can print a more detailed traceback right now with "%tb", or use "%debug" to interactively debug it.

Extra-detailed tracebacks for bug-reporting purposes can be enabled via: c.Application.verbose_crash=True

But if I run it as root then it works fine. I have installed it all without root permission though. I thought it might be a permission problem and gave all the permissions for the files to the user k1, but still the problems exists.

So, I gained the permission to '/home/k1/.sage' and now it runs, but there are new errors:

[SageTerminalApp] Could not set security dir permissions to private.

[SageTerminalApp] Could not set pid dir permissions to private.

and I can't open the notebook().

the output of "ls -l /home/k1/ | grep .sage" is empty.

The output of "ls -l /home/k1/.sage" is :

total 28

drwsrwsrwt 2 k1 k1 4096 Mar 28 20:37 cache

drwsrwsrwt 2 k1 k1 4096 Mar 28 16:11 db

-rwxrwxrwt 1 k1 k1 0 Mar 29 17:39 gp-expect.log

-rwsrwsrwt 1 k1 k1 0 Mar 28 20:20 init.sage

drwsrwsrwt 3 root root 4096 Mar 29 17:39 ipython-0.12

drwsrwsrwt 2 k1 k1 4096 Mar 28 19:26 matplotlib-1.1.0

drwsrwsrwt 3 root ...

edit retag flag offensive close merge delete



Your error seems to be related to permissions. Can you be more explicit on the procedure you used for installation ? Moreover, can you copy/paste the output of the commands "ls -l /home/k1/ | grep .sage" and "ls -l /home/k1/.sage" ?

vdelecroix gravatar imagevdelecroix ( 2013-03-29 01:47:11 -0500 )edit

First I downloaded the sage package from the website and unzipped it and ran the make command. it was installed and worked fine with root, but not under the user k1. Then I deleted it and added the ppa to the sources and installed it from there, same problem.

k1 gravatar imagek1 ( 2013-03-29 13:39:01 -0500 )edit

I've added the output of those commands at the end of the main post.

k1 gravatar imagek1 ( 2013-03-29 13:41:33 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2013-03-29 23:26:08 -0500

updated 2013-03-29 23:26:33 -0500


As you can see with the output of ls, some of the directory within .sage are owned by root, namely ipython-0.12, sage_notebook.sagenb and tmp. I don't know how such a thing could happen ! You can change the permissions with the command

sudo chown k1:k1 -R .sage

The command chown is for modifying users, k1:k1 means that you change the user and the group to k1 and -R is for recursive.

After that, it may work.


edit flag offensive delete link more



That worked just as you said. Thank you very much.

k1 gravatar imagek1 ( 2013-04-10 08:14:39 -0500 )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


Asked: 2013-03-28 17:02:29 -0500

Seen: 517 times

Last updated: Mar 29 '13