python问题解决: module ‘test‘ has no attribute

不可以使用test.py这种命名,因为Anaconda自带的环境中有这个文件,会造成重定义问题

C:\ProgramData\Anaconda3\lib\test\__init__.py

ImportError: cannot import name 'test1' from 'test'  (C:\ProgramData\Anaconda3\lib\test\__init__.py)

解决方法:

将test.py重命名为test2.py

 

 

你可能感兴趣的:(机器学习入门)