0
votes

When I try to import from sklearn

from sklearn import neighbours, datasets

I get the following:


ImportError Traceback (most recent call last) in ----> 1 from sklearn import neighbours, datasets ImportError: cannot import name 'neighbours' from 'sklearn' (C:\Users\35386\Anaconda3\lib\site-packages\sklearn__init__.py)

I have 0.20.1 (from Anaconda3)

1
The module is named neighbors :) American spelling - Romain Reboulleau

1 Answers

1
votes

use neighbors instead of neighbours

from sklearn import neighbors, datasets