0

I am trying to implement a simple multi-layer network in colab using python. To do so, I ran the following code.

Code

from pymnet import *

mnet = MultilayerNetwork(aspects=1)
mnet.add_node(1)
mnet.add_layer('a')

mnet[1,'a'].deg()

However, I keep getting the following error.

Error

ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-3-74cefa95e553> in <module>()
----> 1 from pymnet import *
      2 mnet = MultilayerNetwork(aspects=1)
      3 mnet.add_node(1)
      4 mnet.add_layer('a')
      5 

ModuleNotFoundError: No module named 'pymnet'

Any suggestions with regard to how I could overcome this error will be much appreciated.

Nayantara Jeyaraj
  • 2,624
  • 7
  • 34
  • 63

1 Answers1

0

The error means that pymnet module is not in Colaboratory. You can download it from pymnet source, then either use it from your drive folder or use the other tricks suggested here, to upload it to your colab space. Some examples for other libraries provided by colab can help too.

ilke444
  • 2,641
  • 1
  • 17
  • 31