From: blwatson on 29 Mar 2008 23:39 On Mar 29, 6:42 pm, "Gabriel Genellina" <gagsl-...(a)yahoo.com.ar> wrote: > En Sat, 29 Mar 2008 20:54:36 -0300, <blwat...(a)gmail.com> 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?
From: Gabriel Genellina on 29 Mar 2008 23:53 En Sun, 30 Mar 2008 00:39:58 -0300, <blwatson(a)gmail.com> escribi�: > First, thanks for the help. You have solved one problem but created a > new one. Isn't that always how it works? Ouch - yes, sometimes :( > 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:[error messages snipped] > 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? I'd remove the egg and all references to it from easy_install.pth, and use the simplejson directory from the source distribution (.tar.gz), as I suggested on a previous message. -- Gabriel Genellina
From: blwatson on 30 Mar 2008 00:48 Rock and roll baby!!! Thanks so much. It took some doing, but many thanks!!!!
First
|
Prev
|
Pages: 1 2 Prev: building psycopg2 on windows using mingw, "cannot find -lpq" Next: PhotoImage problem |