FenTechSolutions / CausalDiscoveryToolbox

Package for causal inference in graphs and in the pairwise settings. Tools for graph structure recovery and dependencies are included.
https://fentechsolutions.github.io/CausalDiscoveryToolbox/html/index.html
MIT License
1.08k stars 198 forks source link

ModuleNotFoundError: No module named 'sklearn.gaussian_process' #37

Closed LizMcQuillan closed 4 years ago

LizMcQuillan commented 4 years ago

While attempted to import cdt, I get a ModuleNotFound error.

For context: I'm on a Mac, running python 3.

Full Traceback:

---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-37-0d5686c1281b> in <module>
      1 import sklearn
      2 import networkx as nx
----> 3 import cdt

~/anaconda3/lib/python3.7/site-packages/cdt/__init__.py in <module>
     26 """
     27 
---> 28 import cdt.causality
     29 import cdt.independence
     30 import cdt.data

~/anaconda3/lib/python3.7/site-packages/cdt/causality/__init__.py in <module>
     22 .. SOFTWARE.
     23 """
---> 24 from .pairwise import __init__
     25 from .graph import __init__

~/anaconda3/lib/python3.7/site-packages/cdt/causality/pairwise/__init__.py in <module>
     22 .. SOFTWARE.
     23 """
---> 24 from .ANM import ANM
     25 from .CDS import CDS
     26 from .Jarfo import Jarfo

~/anaconda3/lib/python3.7/site-packages/cdt/causality/pairwise/ANM.py in <module>
     27 """
     28 
---> 29 from sklearn.gaussian_process import GaussianProcessRegressor
     30 from sklearn.preprocessing import scale
     31 from .model import PairwiseModel

ModuleNotFoundError: No module named 'sklearn.gaussian_process'
diviyank commented 4 years ago

Hi, Can I have the version of your 'cdt' and 'scikit-learn' packages ? Thanks !

LizMcQuillan commented 4 years ago

sklearn version 0.20.3, cdt version 0.5.8

diviyank commented 4 years ago

Ok, could you try updating your scikit-learn ?

LizMcQuillan commented 4 years ago

Just updated sklearn, now I'm just getting a new error message ImportError: cannot import name '__version__' from 'sklearn' (unknown location)

diviyank commented 4 years ago

Strange, it seems that your sklearn installation broke somewhere ; can you try uninstalling it and reinstalling it ? Please post the full traceback if possible. Best, Diviyan

diviyank commented 4 years ago

Ok I didn't see your other post (#39) with the full traceback; I will be answering here.

diviyank commented 4 years ago

Hi, Do you have any updates on this bug ?

Best, Diviyan

diviyank commented 4 years ago

Hi, I will be closing this issue for inactivity, don't hesitate to reopen it if the issue is not fixed.

Best, Diviyan