Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ModuleNotFoundError #30

Open
DanitShifmanAbukasis opened this issue Jun 15, 2021 · 2 comments
Open

ModuleNotFoundError #30

DanitShifmanAbukasis opened this issue Jun 15, 2021 · 2 comments

Comments

@DanitShifmanAbukasis
Copy link

Hi,
Importing the library fails with errors including:

  • No module named 'sklearn.externals.joblib'
  • ImportError: cannot import name 'six' from 'sklearn.externals'
  • ModuleNotFoundError: No module named 'sklearn.externals.six.moves'
    Do you familiar with those errors and know how to handle them?
    Thanks in advance!
    Danit.
@joeanton719
Copy link

I am having a similar error too.

---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-117-fa33478a481d> in <module>
----> 1 from costcla.models import BayesMinimumRiskClassifier

~\anaconda3\lib\site-packages\costcla\__init__.py in <module>
     29 from .metrics import *
     30 from .datasets import *
---> 31 from .models import *
     32 

~\anaconda3\lib\site-packages\costcla\models\__init__.py in <module>
      4 
      5 from .directcost import BayesMinimumRiskClassifier, ThresholdingOptimization
----> 6 from .regression import CostSensitiveLogisticRegression
      7 from .cost_tree import CostSensitiveDecisionTreeClassifier
      8 

~\anaconda3\lib\site-packages\costcla\models\regression.py in <module>
     11 from sklearn.base import BaseEstimator
     12 # from sklearn.linear_model.logistic import _intercept_dot
---> 13 from pyea import GeneticAlgorithmOptimizer
     14 from ..metrics import cost_loss
     15 

~\anaconda3\lib\site-packages\pyea\__init__.py in <module>
     11 
     12 
---> 13 from .models import *

~\anaconda3\lib\site-packages\pyea\models\__init__.py in <module>
----> 1 from .ga import GeneticAlgorithmOptimizer

~\anaconda3\lib\site-packages\pyea\models\ga.py in <module>
     10 import pandas as pd
     11 from scipy.stats import norm
---> 12 from sklearn.externals.joblib import Parallel, delayed, cpu_count
     13 import itertools
     14 

ModuleNotFoundError: No module named 'sklearn.externals.joblib'

@DanitShifmanAbukasis
Copy link
Author

I solved it locally on my computer by changing the imports where needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants