Posts

Showing posts with the label networkx

How to upgrade networkx to developer version in Linux

Weight functions are only available on networkx development version. To install it you need to do the following: git clone https://github.com/networkx/networkx.git cd networkx sudo python setup.py install nosetest ERROR: Failure: ImportError (No module named coverage) ImportError: No module named pandas To fix it, install these libraries and re-run nesetest: sudo pip install pandas coverage nosetests ---------------------------------------------------------------------- Ran 3045 tests in 33.191s OK (SKIP=7) If you run your python console you can ask for networkx version as follows: python                 Python 2.7.12 (default, Nov 19 2016, 06:48:10)  [GCC 5.4.0 20160609] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import networkx >>> print networkx.__version__ 2.0.dev_20170321173742 But, if you run your code it still be using version 1.1 Now you ne...

How to import a graphml topology in mininet

If you want to load topologies in your network emulation with mininet, the best option is use grahpml format. I compared a lot extesions available from Gephi and Cytoscape (software for work with topologies) and graphml is one of the extensions that gives more information about the topology. You can export your topologies and save information like label, geolocalization, delay, bw, loss, etc. If you want real topologies, you can get them from Topology Zoo website . To import these topologies to mininet, you can use  Auto-Mininet (for mininet 2.0.0): git clone https://github.com/uniba-ktr/assessing-mininet.git cd assessing-mininet/parser wget  http://topology-zoo.org/files/Chinanet.graphml ./GraphML-Topo-to-Mininet-Network-Generator.py -f Chinanet.graphml -o chinaNet.py python chinaNet.py   File "test", line 44     Xi'an = self.addSwitch( 's18' )                             ^ Syn...