import sklearn as skl print( skl.__version__ ) # 0.17.1 from sklearn import datasets #includes importable relationships, but no attribute relationships ''' #iris = skl.datasets.load_iris() #Error, because there is no attribute relationship module 'sklearn' has no attribute 'datasets'
Attachment: the difference between from import and import 1、from numpy import zeros The zeros() function can be called directly 2、import numpy.zeros Only the full name numpy.zeros can be used ''' iris = datasets.load_iris()