error when importing ijson module python

柔情痞子 提交于 2019-12-24 06:39:49

问题


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.



来源:https://stackoverflow.com/questions/11485610/error-when-importing-ijson-module-python

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!