ImportError: No module named 'sklearn.metrsics'

Run code on the server and found

ImportError: No module named 'sklearn.metrsics'

After the list pip found the sklearn already installed,   

Reloading does not work after uninstallation.

Finally, change a little, calling sequence,

Change the order before,

import torch 
from sklearn.metrics import confusion_matrix

Order after the change

from sklearn.metrics import confusion_matrix
import torch 

 

Published 234 original articles · won praise 61 · views 120 000 +

Guess you like

Origin blog.csdn.net/weixin_42528089/article/details/104926109