代码中有yaml.warnings({'YAMLLoadWarning': False})
运行代码的时候出现AttributeError: module ‘yaml’ has no attribute ‘warning’ 错误
解决方法:直接在你的编译环境的目录下进行安装新的模块
比如说我的解释器为下图:
file——setting,然后步骤如上图
知道了解释器的文件及之后,直接使用cmd命令行(可以直接在电脑旁边的搜索框里输入cmd)
首先,进入上图解释器的文件夹中
然后输入命令(使用清华镜像速度更快)
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --ignore-installed PyYAML
完成。
相关文章
- AttributeError: module ‘yaml‘ has no attribute ‘warning‘
- AttributeError module pandas has no attribute dataframe
- AttributeError: ResultSet object has no attribute ‘find_all‘.
- mmdetection 报错: AttributeError: ‘ConfigDict‘ object has no attribute ‘pipeline‘
- AttributeError: module ‘torch‘ has no attribute ‘_six‘------重启后问题解决
- 【Python】成功解决AttributeError: ‘MyClass‘ object has no attribute ‘my_attribute‘
- 详解module ‘yaml‘ has no attribute ‘FullLoader‘
- pycharm最新版新建工程没导入本地包问题:module 'selenium.webdriver' has no attribute 'Firefox'
- AttributeError: 'LoginForm' object has no attribute 'is_bound' , object has no attribute 'is_bound'
- flask_route错误:AttributeError: 'function' object has no attribute 'route'