-2

I am trying to import linear regression library from sklearn module using the syntax below with Jupyter notebook:

from sklearn.linear_model import LinearRegression

But I am getting the error below:

ModuleNotFoundError: No module named 'scipy.linalg._matfuncs_sqrtm_triu'

I have successfully installed the scikit-learn library several times but issue still persist.

desertnaut
  • 57,590
  • 26
  • 140
  • 166

1 Answers1

0

Questions:

  1. How are you installing scikit-learn, is it via a conda environment/a virtual environment, if so are you activating the environment before executing the said commands?
  2. Are you able to import sklearn? is it a sklearn issue or an issue with LinearRegression module, if it is an issue with sklearn, I'd suggest creating a virtual environment/conda environment and try installing from there and try again

P.S.: not able to comment on the question directly, so have written the questions here

Harsh Sharma
  • 183
  • 1
  • 10