Installing simplejson issues

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Sat Mar 29 21:42:30 EDT 2008


En Sat, 29 Mar 2008 20:54:36 -0300, <blwatson at 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




More information about the Python-list mailing list