簡體   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