简体   繁体   中英

working with large graphml files in networkX

I have some fairly large .graphml files (~7GB) and I would like to run some algorithms on these files using NetworkX. Whenever I try to read these graphml files with:

print "Reading in the Data...\n"
G = nx.read_graphml('%s' % path_string)
plt.title('%s Network' % name_string)
nx.draw(G)
plt.show()

I get the following output:

/usr/bin/python2.7 /home/user/PycharmProjects/G_Project/Graph.py
Reading in the Data...


Process finished with exit code 139

I'm assuming this happens because my computer runs out of memory when trying to open the file, but I was wondering, is there a way to work with large .graphml files and still use NetworkX?

I've gotten pretty use to NetworkX and find it useful, so if there is some sort of workaround for large graphml files I'd appreciate it.

I realize this is not a networkX answer but I would suggest considering graph-tool . It supports graphml format as well.

You can check the comparison of graph-tool and networkx on their website .

Note: I don't have the reputation to comment. Hence, posting as an answer.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM