On Mar 29, 6:42 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Sat, 29 Mar 2008 20:54:36 -0300, <[EMAIL PROTECTED]> escribió: > > > I tried to add the directory "/<somepath>/simplejson" to my sys.path > > in the interpreter, hoping that the call to import simplejson would > > work if the dir was there, even though simplejson.py did not exist is > > that dir, but the encoder, decoder, jsonfilter and scanner .py files > > were all there. > > > My problem is that the call "import simplejson" fails. How can I make > > that call work? > > simplejson is a package (a directory with an __init__.py), not a module; > don't look for simplejson.py > Its *parent* directory must be in sys.path for Python to find it. Try > copying the simplejson directory below site-packages (which should be > already in sys.path) > > -- > Gabriel Genellina
Gabriel - First, thanks for the help. You have solved one problem but created a new one. Isn't that always how it works? So I copied over the dir, and now I get this error when trying to import simplejson: <being error> The following error occurred while trying to extract file(s) to the Python egg cache: [Errno 13] Permission denied: '/Users/bwatson/.python-eggs/ simplejson-1.8.1-py2.5-macosx-10.3-fat.egg-tmp/simplejson/tmpJVSqa_. $extract' The Python egg cache directory is currently set to: /Users/bwatson/.python-eggs Perhaps your account does not have write access to this directory? You can change the cache directory by setting the PYTHON_EGG_CACHE environment variable to point to an accessible directory. <end error> So I went looking for that egg...the following exists in my frameworks dir: simplejson-1.8.1-py2.5-macosx-10.3-fat.egg I hate eggs...I am stuck again. Any ideas? -- http://mail.python.org/mailman/listinfo/python-list