python ImportError: cannot import name 'xx' from 'xx' (G:\python3.7\lib\test\__init__.py)
from test import NN, kNN
源代码如上,用spyder运行报错 ImportError: cannot import name 'NN' from 'test' (G:\python3.7\lib\test\__init__.py) ,后面紧跟着我的python路径。
这种情况是我自己写的test.py与python自有库撞名称然后链接出错了

解决方法,将test.py改名就可以了。
浙公网安备 33010602011771号