I faced same issue but then i realized that my program name was sklearn.py . In case if any one sees this type of error also check that you program name is not same as the package name , or else you will get module object has no attribute error, as in the question .