ndlib icon indicating copy to clipboard operation
ndlib copied to clipboard

No module named 'ndlib.models.compartments.enums'

Open meekokaka opened this issue 4 years ago • 3 comments

Hi,

I'm learning to use ndlib for my project. When importing EdgeStochastic, I received an error.

I'm using the latest version of ndlib. The error occurred on both Windows and Linux.

error

meekokaka avatar Mar 24 '21 15:03 meekokaka

Hi, i'm having the same problem and i solved it by adding the "enums" directory (downloadable from this git in ndlib/models/compartments link: https://github.com/GiulioRossetti/ndlib/tree/master/ndlib/models/compartments) to your python's site-packages. You must add it to /ndlib/models/compartments. On your code you need to call EdgeStocastic using from ndlib.models.compartments import EdgeStochastic as es I use macos and it works for me.

RaspyThommy avatar Apr 02 '21 09:04 RaspyThommy

Hi, the fix is already in the GitHub version of the library: just uninstall your current ndlib version and pip install it anew from github.

We'll push an updated version of the package on pypi next week.

GiulioRossetti avatar Apr 02 '21 11:04 GiulioRossetti

Looks like it is still not up to date: https://pypi.org/project/ndlib/

jameshughes89 avatar Jun 07 '21 14:06 jameshughes89