Hi Paul, <div>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:</div>
<div><div>1. changed permssion on ipython egg</div><div>'sudo chown -R ashah /Library/Python/2.6/site-packages/ipython-0.10-py2.6.egg/'</div><div>2. changed permission on ~/.ipython directory so log files can be written</div>
<div>'sudo chown -R ashah ./.ipython'</div><div><br></div><div><br></div><div>Best,</div><div>Akhil</div><br><div class="gmail_quote">On Wed, Dec 22, 2010 at 1:52 PM, Paul Ivanov <span dir="ltr"><<a href="mailto:pivanov314@gmail.com">pivanov314@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">Akhil Shah, on 2010-11-19 18:31, wrote:<br>
> Hi,<br>
> I have installed IPython on OSX 10.6 but can only run it via 'sudo ipython'.<br>
> Invoking 'ipython' without sudo leads to the following error:<br>
> Traceback (most recent call last):<br>
> File "/usr/local/bin/ipython", line 5, in <module><br>
> from pkg_resources import load_entry_point<br>
> File<br>
> "/Library/Python/2.6/site-packages/setuptools-0.6c11-py2.6.egg/pkg_resources.py",<br>
> line 2603, in <module><br>
><br>
> File<br>
> "/Library/Python/2.6/site-packages/setuptools-0.6c11-py2.6.egg/pkg_resources.py",<br>
> line 666, in require<br>
><br>
> File<br>
> "/Library/Python/2.6/site-packages/setuptools-0.6c11-py2.6.egg/pkg_resources.py",<br>
> line 565, in resolve<br>
><br>
> Does anyone know what causes this and how to fix it?<br>
><br>
> I have a similar problem when I import pylab into my python scripts. The<br>
> script will run if I 'sudo' but spits out the following error otherwise:<br>
> from pylab import *<br>
> File<br>
> "/Library/Python/2.6/site-packages/matplotlib-1.0.0-py2.6-macosx-10.6-universal.egg/pylab.py",<br>
> line 1, in <module><br>
> from matplotlib.pylab import *<br>
</div>- snip -<br>
<div class="im">> raise RuntimeError("'%s' is not a writable dir; you must set<br>
> %s/.matplotlib to be a writable dir. You can also set environment variable<br>
> MPLCONFIGDIR to any writable directory where you want matplotlib data stored<br>
> "% (h, h))<br>
> RuntimeError: '/Users/ashah' is not a writable dir; you must set<br>
> /Users/ashah/.matplotlib to be a writable dir. You can also set environment<br>
> variable MPLCONFIGDIR to any writable directory where you want matplotlib<br>
> data stored<br>
<br>
</div>Hi Akhil,<br>
<br>
You sent this to the list a while back, but no one seemed to<br>
reply, so I thought I'd take a stab at it.<br>
<br>
I'm not sure about the first problem you mentioned, but the<br>
second one I think I can shed some light on. You would get this<br>
if /Users/ashah/.matplotlib is owned by root, your IPython error<br>
may also be related to this. The output of<br>
<br>
$ ls -al ~/ | grep matplotlib<br>
<br>
should be something like:<br>
<br>
drwxr-xr-x 3 ashah ashah 4096 2010-12-20 17:58 .matplotlib/<br>
<br>
not:<br>
<br>
drwxr-xr-x 3 root root 4096 2010-12-20 17:58 .matplotlib/<br>
<br>
you can use something like this command to fix the above<br>
$ chown ashah:ashah ~/.matplotlib<br>
<br>
best,<br>
<font color="#888888">--<br>
Paul Ivanov<br>
314 address only used for lists, off-list direct email at:<br>
<a href="http://pirsquared.org" target="_blank">http://pirsquared.org</a> | GPG/PGP key id: 0x0F3E28F7<br>
</font><br>-----BEGIN PGP SIGNATURE-----<br>
Version: GnuPG v1.4.10 (GNU/Linux)<br>
<br>
iEYEARECAAYFAk0ScxcACgkQe+cmRQ8+KPcMggCfXi3UDQezvU0ib7NDV66KeuEQ<br>
VhoAnj/ICiPjbIuwoMZ+JEnNlV6Hdg0d<br>
=sq/V<br>
-----END PGP SIGNATURE-----<br>
<br></blockquote></div><br></div>