In [1]: import sqlite3
In [2]: import pandas as pd
In [3]: import numpy as np
In [4]: import matplotlib.pyplot as plt
In [5]: from sklearn.cluster import Kmeans
ImportError Traceback (most recent call last)
<ipython-input-5-0125bea01c25> in <module>()
----> 1 from sklearn.cluster import Kmeans
ImportError: cannot import name 'Kmeans'
Scikit-learn版本为0.18.2
答案 0 :(得分:2)
这只是一个错字。 KMeans中的“m”应该是资本:
from sklearn.cluster import KMeans