本人入门学习yolo,用jupyter notebook运行代码时遇到报错,显示anaconda中一个文件少了东西
182 main_module = sys.modules['main']
--> 183 main_mod_name = getattr(main_module.spec, "name", None)
184 if main_mod_name is not None:
185 d['init_main_from_name'] = main_mod_name
AttributeError: module 'main' has no attribute 'spec'
这里有同样问题的讨论,他们建议的解决办法是在if name=='main'中添加一句 spec=None
https://stackoverflow.com/questions/45720153/python-multiprocessing-error-attributeerror-module-main-has-no-attribute
是不是安装的模块版本不对