error when importing ijson module python

2019-07-26 22:39发布

问题:

I need to parse some large (2 Gb+) files into python. I have tried it with the json module but I get a memory error as its methods all load the files at once. I then moved on into installing ijson which suposedly implements a iterator-based way of parsing the file. However when I run:

import ijson

I get exception : YAJL shared object not found.

Has anyone found a similar issue? any help would be greatly appreciated

Regards

回答1:

Thats an easy one, that is because you haven't installed the YAJL C library! ijson is a wrapper around the YAJL without it won't work.



标签: python json yajl