【Python学习】python不要使用任何模块名作为文件名(module 'xgboost' has no attribute 'DMatrix')
2017-02-27 20:21
716 查看
今天第一次上手xgboost,上午按照安装教程吧xgboost装上,然后各种用得不亦乐乎,晚上关电脑吃饭去,回来开电脑想继续回味xgboost,发现一运行就出现了 module 'xgboost' has no attribute 'DMatrix'这个问题,心灰意冷。。。最后发现是自己python的文件命开机手痒命名成xgboost了,换了之后一切正常,从中又学到了一个小知识点,注意不要使用任何模块名为文件名。
相关文章推荐
- python文件名不要跟模块名相同,报错AttributeError: 'module' object has no attribute 'Differ'
- module 'xgboost' has no attribute 'DMatrix'问题的解决方案
- 学习Python csv模块遇到AttributeError: module 'csv' has no attribute 'writer'和写入后出现空格问题
- python3.6脚本import json模块后,报错:AttributeError: module 'json' has no attribute 'dumps'
- 出现module 'xgboost' has no attribute 'DMatrix'的临时解决方法
- 使用sae-python-dev本地运行web.py项目出现module object has no attribute InteractiveInterpreter
- 当安装好Xgboost后当调用其函数出现``` AttributeError: module 'xgboost' has no attribute 'feature_importance_'
- Python基础学习-'module' object has no attribute 'urlopen'解决方法
- 【python学习笔记(2)】脚本报错"AttributeError: 'module' object has no attribute 'xxx'"解决方法
- Python 使用sqlite3报错 AttributeError: 'module' object has no attribute 'connect'
- python 使用scapy包告警WARNING: can't import layer inet: 'module' object has no attribute 'IPPROTO_IPIP'
- python文件名与module名冲突,出错'module' object has no attribute 'strftime'
- python-module 'pymysql' has no attribute 'connect'
- 使用cx_freeze工具打包时提示 AttributeError 'module' object has no attribute '_fix_up_module':
- python 2.x和3.x关于 'module' object has no attribute 'open'的解决办法
- [python错误]builtins.AttributeError: 'module' object has no attribute 'request'
- python使用PIL库报错,'NoneType' object has no attribute 'bands'
- Python脚本报错AttributeError: ‘module’ object has no attribute’xxx’解决方法
- Python脚本报错AttributeError: ‘module’ object has no attribute’xxx’解决方法
- Python使用模块Pyserial模块报<ImportError:No module named tools.list_ports>