没有名为 ijson 的模块
No module named ijson
我有一个很大的 json 推文文件(大约 5GB)。我有内存错误。所以,我决定解析数据。我找到了 ijson 包。我有这样的错误:
import ijson
parser = ijson.parse(tweets_data_path )
tweets_data = []
f = open(tweets_data_path, "r")
objects = ijson.items(f, 'other_config.item')
for line in objects:
try:
tweet = json.loads(line)
tweets_data.append(tweet)
except:
continue
"No module named ijson"
我是 Python 的新手,我查看了包的源文件。但我可以完全了解要求是什么。任何帮助将不胜感激。
我有一个很大的 json 推文文件(大约 5GB)。我有内存错误。所以,我决定解析数据。我找到了 ijson 包。我有这样的错误:
import ijson
parser = ijson.parse(tweets_data_path )
tweets_data = []
f = open(tweets_data_path, "r")
objects = ijson.items(f, 'other_config.item')
for line in objects:
try:
tweet = json.loads(line)
tweets_data.append(tweet)
except:
continue
"No module named ijson" 我是 Python 的新手,我查看了包的源文件。但我可以完全了解要求是什么。任何帮助将不胜感激。