Trying to unpickle estimator LinearRegression from version 0.23.2 when using version 1.1.2.

1. Background

Run the Python project, the error message is as follows:

Trying to unpickle estimator LinearRegression from version 0.23.2 when using version 1.1.2.

From the error message, it is because the version of scikit-learn is too high , so it is not supported, and the version needs to be reduced to 0.32.2


Two, the solution

Install scikit-learn version 0.32.2 , the installation command is as follows:

pip install scikit-learn==0.23.2

or

pip install scikit-learn==0.23.2 -i https://pypi.tuna.tsinghua.edu.cn/simple 

It is recommended to specify Tsinghua source, the download is relatively fast!



Supongo que te gusta

Origin blog.csdn.net/aikudexiaohai/article/details/130101154
Recomendado
Clasificación