Resolved: ImportError: cannot import name 'BaseEstimator'
Please why is BaseEstimator not importing? Kindly help look into this.
Hi Olanike!
Thanks for reaching out.
Currently I, for instance, experience no issue running the code you've shared.
Therefore, I suppose we are talking about some sort of incompatibility between the modules/packages that you are using. Hence the error you encounter is import error.
First, please ensure your scikit-learn module version is 1.3.0 or above. To check this version, you can execute pip3 list | findstr scikit
in Anaconda Prompt. If the version is lower than that, please update.
Hope this helps but please feel free to get back to us should you need further assistance. Thank you.
Best,
Martin
Hi Martin,
My first observation is that it has taken almost 2 weeks to answer this question. Most of the time, this delayed answers delays my inability to progress on the course. Can 365 do better with timely response please? Thanks.
My version is 1.3.0, so it should be compatible. What else can I check?
Hi Olanike!
Thank you very much for your reply and please excuse us for managing your question with a delay.
In that case, can you please check if there are other Python files with the same name as the Notebook Document you are currently running the given code from? Perhaps you can change the name of your file and try rerunning this code cell?
To solve a question that goes beyond a Python script (like this one, which regards a module and/or file organisation), we might need some extra time since the cause for the issue might be way more complex than just understanding the relevant piece of code. Nevertheless, please bear with us, I believe that after a few exchanges in this thread we will find a solution!
Looking forward to your answer.
Kind regards,
Martin
upgrade your microsoft visual
microsoft visual c++ 14.0 or greater is required. get it with "microsoft c++ build tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
after that upgrade your scikit-learn
it will work ,i have the same problem
Hi Md!
Thanks for reaching out and sharing a solution with the Community!
Kind regards,
Martin