繁体   English   中英

为什么我在执行 PCA 时遇到此错误:- AttributeError: 'NoneType' object has no attribute 'split'

[英]Why i am getting this error while doing PCA :- AttributeError: 'NoneType' object has no attribute 'split'

import pandas as pd 

import numpy as np 

import seaborn as sns

wine=pd.read_csv('winequality-red.csv')

from imblearn.over_sampling import SMOTE

wine_x=wine.iloc[:,0:-1]
wine_y=wine.iloc[:,-1]

smt=SMOTE()

x,y=smt.fit_resample(wine_x,wine_y)

在我安装它的最后一个代码中,我得到了这个 AttributeError。

File ~\anaconda3\lib\site-packages\threadpoolctl.py:646, in _OpenBLASModule.get_version(self)
    643 get_config = getattr(self._dynlib, "openblas_get_config",
    644                      lambda: None)
    645 get_config.restype = ctypes.c_char_p
--> 646 config = get_config().split()
    647 if config[0] == b"OpenBLAS":
    648     return config[1].decode("utf-8")

> AttributeError: 'NoneType' object has no attribute 'split'

我该如何纠正它?

我在尝试训练 MiniBatchKMeans model 时遇到了同样的问题。 我通过将 Python 版本从 3.9 更改为 3.8 或 3.7 来解决它

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM