当前位置:首页 > 编程笔记 > 正文
已解决

使用sklearn报AttributeError: ‘NoneType‘ object has no attribute ‘split‘

来自网友在路上 163863提问 提问时间:2023-11-19 08:27:46阅读次数: 63

最佳答案 问答题库638位专家为你答疑解惑

错误原因

在使用scikit-learn的时候报AttributeError: 'NoneType' object has no attribute 'split'

Exception ignored on calling ctypes callback function: <function _ThreadpoolInfo._find_modules_with_dl_iterate_phdr..match_module_callback at 0x7fb757978160>
Traceback (most recent call last):
File “/data/miniconda3/envs/sklearn/lib/python3.8/site-packages/threadpoolctl.py”, line 400, in match_module_callback
self._make_module_from_path(filepath)
File “/data/miniconda3/envs/sklearn/lib/python3.8/site-packages/threadpoolctl.py”, line 515, in _make_module_from_path
module = module_class(filepath, prefix, user_api, internal_api)
File “/data/miniconda3/envs/sklearn/lib/python3.8/site-packages/threadpoolctl.py”, line 606, in init
self.version = self.get_version()
File “/data/miniconda3/envs/sklearn/lib/python3.8/site-packages/threadpoolctl.py”, line 646, in get_version
config = get_config().split()
AttributeError: ‘NoneType’ object has no attribute ‘split’

环境
scikit-learn 1.3.2
threadpoolctl-2.1.0
python 3.8.10
错误原因分析

通过错误原因能看出来是因为threadpoolctl的原因导致的,将threadpoolctl更新到下面的版本即可

pip install threadpoolctl==3.1.0
查看全文

99%的人还看了

猜你感兴趣

版权申明

本文"使用sklearn报AttributeError: ‘NoneType‘ object has no attribute ‘split‘":http://eshow365.cn/6-39075-0.html 内容来自互联网,请自行判断内容的正确性。如有侵权请联系我们,立即删除!