Issue
I am setting up a Machine Learning model using Linear Regression however trying to run
from sklearn.model_selection import train_test_split
throws below exception:
ImportError: cannot import name '_argmax' from 'sklearn.utils.fixes'
I am working with PyCharm (Jupyter notebook) and also tried restarting kernel.
However, when I try to run code from Pycharm in a Python file it works.
Solution
I reinstalled sklearn followed by creating conda virtual environment. I then used this newly created conda venv from Pycharm and the code start working i.e. PyCharm no longer raised import error.
Answered By - JavaMan
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.