[IPython-User] need to sudo prior to running

Akhil Shah akhil137@gmail....
Wed Dec 22 21:32:37 CST 2010


Hi Paul,
Thanks for the tip.  Changing ownership from 'root' to 'ashah' did the trick
for the second issue that resulted from trying to write to ~/.matplotlib
directory when I did not have permission.  The first problem (having to use
sudo ipython, instead of just ipython) was similarly fixed using the
following steps:
1. changed permssion on ipython egg
'sudo chown -R ashah
/Library/Python/2.6/site-packages/ipython-0.10-py2.6.egg/'
2. changed permission on ~/.ipython directory so log files can be written
'sudo chown -R ashah ./.ipython'


Best,
Akhil

On Wed, Dec 22, 2010 at 1:52 PM, Paul Ivanov <pivanov314@gmail.com> wrote:

> Akhil Shah, on 2010-11-19 18:31,  wrote:
> > Hi,
> > I have installed IPython on OSX 10.6 but can only run it via 'sudo
> ipython'.
> >  Invoking 'ipython' without sudo leads to the following error:
> > Traceback (most recent call last):
> >   File "/usr/local/bin/ipython", line 5, in <module>
> >     from pkg_resources import load_entry_point
> >   File
> >
> "/Library/Python/2.6/site-packages/setuptools-0.6c11-py2.6.egg/pkg_resources.py",
> > line 2603, in <module>
> >
> >   File
> >
> "/Library/Python/2.6/site-packages/setuptools-0.6c11-py2.6.egg/pkg_resources.py",
> > line 666, in require
> >
> >   File
> >
> "/Library/Python/2.6/site-packages/setuptools-0.6c11-py2.6.egg/pkg_resources.py",
> > line 565, in resolve
> >
> > Does anyone know what causes this and how to fix it?
> >
> > I have a similar problem when I import pylab into my python scripts.  The
> > script will run if I 'sudo' but spits out the following error otherwise:
> >   from pylab import *
> >   File
> >
> "/Library/Python/2.6/site-packages/matplotlib-1.0.0-py2.6-macosx-10.6-universal.egg/pylab.py",
> > line 1, in <module>
> >     from matplotlib.pylab import *
> - snip -
> >     raise RuntimeError("'%s' is not a writable dir; you must set
> > %s/.matplotlib to be a writable dir.  You can also set environment
> variable
> > MPLCONFIGDIR to any writable directory where you want matplotlib data
> stored
> > "% (h, h))
> > RuntimeError: '/Users/ashah' is not a writable dir; you must set
> > /Users/ashah/.matplotlib to be a writable dir.  You can also set
> environment
> > variable MPLCONFIGDIR to any writable directory where you want matplotlib
> > data stored
>
> Hi Akhil,
>
> You sent this to the list a while back, but no one seemed to
> reply, so I thought I'd take a stab at it.
>
> I'm not sure about the first problem you mentioned, but the
> second one I think I can shed some light on. You would get this
> if /Users/ashah/.matplotlib is owned by root, your IPython error
> may also be related to this. The output of
>
>  $ ls -al ~/ | grep matplotlib
>
> should be something like:
>
> drwxr-xr-x   3 ashah   ashah       4096 2010-12-20 17:58 .matplotlib/
>
> not:
>
> drwxr-xr-x   3 root   root       4096 2010-12-20 17:58 .matplotlib/
>
> you can use something like this command to fix the above
>  $ chown ashah:ashah ~/.matplotlib
>
> best,
> --
> Paul Ivanov
> 314 address only used for lists,  off-list direct email at:
> http://pirsquared.org | GPG/PGP key id: 0x0F3E28F7
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (GNU/Linux)
>
> iEYEARECAAYFAk0ScxcACgkQe+cmRQ8+KPcMggCfXi3UDQezvU0ib7NDV66KeuEQ
> VhoAnj/ICiPjbIuwoMZ+JEnNlV6Hdg0d
> =sq/V
> -----END PGP SIGNATURE-----
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-user/attachments/20101222/206daa7a/attachment.html 


More information about the IPython-User mailing list