NetworkX

About

NetworkX (NX) is a Python package for the creation, manipulation, and study of the structure, dynamics, and functions of complex networks.

Requirements

To use NetworkX you need

Optional useful packages:

Downloading

You can download NetworkX from http://sourceforge.net/projects/networkx/

Quick Install

(See the Tutorial for more information)

Linux and OSX (install from source)

Download the source tarball, unpack, and run "python setup.py install".

Windows (binary installer)

Download the installer, run and follow the instructions. Please note that we are not Windows users and have only verified that the Windows installer passes the "smoke test". If you have problems we suggest installing from the source distribution.

Using

Just write in Python

>>> import NX
>>> G=NX.Graph()
>>> G.add_edge(1,2)
>>> G.add_node("spam")
>>> print G.nodes()
[1, 2, 'spam']
>>> print G.edges()
[(1, 2)]

See the Tutorial, Reference, Quick_Ref, and Examples.

SourceForge.net Logo