解决AttributeError: ‘NoneType’ object has no attribute 'loader’报错问题
ps:作者是很用心写的,如果觉得不错,请给作者一点鼓励噢!(点赞收藏评论噢)
问题描述
1)在Anoconda Prompt窗口torch环境下无论运行什么命令,都出现AttributeError: ‘NoneType’ object has no attribute 'loader’报错,命令运行失败
2)打开torch环境下的jupyter编辑器也会出现相应报错
原因分析
1)输入指令查看安装了哪些Python库
python -m pip list
结果:发现当前torch环境下并没有安装matplotlib库,回到base环境,发现问题出在base环境下的matplotlib库
解决过程
base环境下重新安装matplotlib库
pip uninstall matplotlib
pip install matplotlib
安装成功!
结果查看
现在torch环境下属于命令行就不会报错啦!!