简体   繁体   中英

ModuleNotFoundError: No module named 'sklearn.linear_model.base' ERROR PYTHON

I am trying to run the PROJECT on my local machine on pycharm.

I am using Anaconda interpreter. and installed scikit-learn 1.2.0 version. Still, I am getting an error

    __model = pickle.load(f)
ModuleNotFoundError: No module named 'sklearn.linear_model.base'

I have tried to solve using the existing answers answer1 on StackOverflow but none of them worked.

I tried to update the scikit-learn version but every time am getting errors.

sklearn.linear_model.base was deprecated in 0.22 and removed in 0.24 .

Old pickle files are not guaranteed to be compatible with newer versions, so an old version of scikit-learn is probably needed. eg:

pip install scikit-learn==0.23.2

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM