gogetakakaroot
gogetakakaroot

Reputation: 53

Import Error of Kmeans in python3.5

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 version is 0.18.2

Upvotes: 4

Views: 7790

Answers (1)

lukess
lukess

Reputation: 964

It's just a typo. The "m" in KMeans should be capital:

from sklearn.cluster import KMeans

Upvotes: 8

Related Questions