[IPython-User] need to sudo prior to running

Akhil Shah akhil137@gmail....
Fri Nov 19 20:31:55 CST 2010


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 *
  File
"/Library/Python/2.6/site-packages/matplotlib-1.0.0-py2.6-macosx-10.6-universal.egg/matplotlib/__init__.py",
line 764, in <module>
    rcParams = rc_params()
  File
"/Library/Python/2.6/site-packages/matplotlib-1.0.0-py2.6-macosx-10.6-universal.egg/matplotlib/__init__.py",
line 682, in rc_params
    fname = matplotlib_fname()
  File
"/Library/Python/2.6/site-packages/matplotlib-1.0.0-py2.6-macosx-10.6-universal.egg/matplotlib/__init__.py",
line 595, in matplotlib_fname
    fname = os.path.join(get_configdir(), 'matplotlibrc')
  File
"/Library/Python/2.6/site-packages/matplotlib-1.0.0-py2.6-macosx-10.6-universal.egg/matplotlib/__init__.py",
line 248, in wrapper
    ret = func(*args, **kwargs)
  File
"/Library/Python/2.6/site-packages/matplotlib-1.0.0-py2.6-macosx-10.6-universal.egg/matplotlib/__init__.py",
line 468, in _get_configdir
    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


Thanks in advance for the help.

Akhil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-user/attachments/20101120/3c2d5f2f/attachment.html 


More information about the IPython-User mailing list