ModuleNotFoundError: No module named 'sklearn.naive_bayes'; 'sklearn' is not a package竟然是因为文件名

ModuleNotFoundError: No module named ‘sklearn.naive_bayes’; ‘sklearn’ is not a package
ModuleNotFoundError: No module named 'sklearn.naive_bayes'; 'sklearn' is not a package竟然是因为文件名_第1张图片
试了网上很多方法都没用,最后竟然是因为文件名是sklearn所以报错,改了文件名错误立刻消失!

你可能感兴趣的:(ModuleNotFoundError: No module named 'sklearn.naive_bayes'; 'sklearn' is not a package竟然是因为文件名)