MaxHalford / sorobn

🧮 Bayesian networks in Python
https://sorobn.streamlit.app
MIT License
234 stars 34 forks source link

Circular import error? #15

Closed scientistkev closed 3 years ago

scientistkev commented 3 years ago

Hey Max,

Thanks for writing a great library. I recently installed it on my machine and I received this error while trying to implement it in a Jupyter notebook:

import hedgehog as hh

ImportError                               Traceback (most recent call last)
<ipython-input-2-c23a444b1dc9> in <module>
----> 1 import hedgehog as hh

/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/hedgehog/__init__.py in <module>
      2 
      3 from . import examples
----> 4 from . import structure
      5 from .bayes_net import BayesNet
      6 

ImportError: cannot import name 'structure' from partially initialized module 'hedgehog' (most likely due to a circular import) (/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/hedgehog/__init__.py)

Now, this could totally be my fault, but I thought I would call it to your attention.

MaxHalford commented 3 years ago

Thanks for opening the issue! I've fixed it. I've updated the Installation section because you need to install vose before install hedgehog.

In the future this package might become more serious and therefore will be published on PyPI. For the moment I'm still experimenting.

MaxHalford commented 3 years ago

@scientistkev tell me if you have further issues :)