简体   繁体   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)

In the last code where I am fitting it, I get this AttributeError.在我安装它的最后一个代码中,我得到了这个 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'

How could I correct it?我该如何纠正它?

I had the same problem when trying to train a MiniBatchKMeans model.我在尝试训练 MiniBatchKMeans model 时遇到了同样的问题。 I solved it by changing the Python version from 3.9 to 3.8 or 3.7我通过将 Python 版本从 3.9 更改为 3.8 或 3.7 来解决它

暂无
暂无

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

相关问题 为什么我会收到“AttributeError: 'NoneType' object has no attribute 'get'” - why am i getting "AttributeError: 'NoneType' object has no attribute 'get' " 为什么我在 /admin/main/consultation/'NoneType' object 没有属性 'lastname' 处出现 AttributeError 错误 - why am i getting error of AttributeError at /admin/main/consultation/ 'NoneType' object has no attribute 'lastname' 为什么我收到“AttributeError: 'NoneType' object has no attribute 'send'”错误 - Why am I getting a `AttributeError: 'NoneType' object has no attribute 'send'` Error AttributeError: 'NoneType' object has no attribute 'split' 错误 - AttributeError: 'NoneType' object has no attribute 'split' Error 为什么我会收到 AttributeError: 'NoneType' object has no attribute 'send' 以及如何避免它? - Why am I getting AttributeError: 'NoneType' object has no attribute 'send' and how to avoid it? Web Scraper:为什么会出现AttributeError:'NoneType'对象没有属性'text'? - Web Scraper: Why am I getting AttributeError: 'NoneType' object has no attribute 'text'? 为什么我收到 AttributeError: “'NoneType' object has no attribute 'get'” 与 Python 和 Tkinkter? - Why I am getting AttributeError: “'NoneType' object has no attribute 'get'” with Python and Tkinkter? 我在“AttributeError:'NoneType'对象中没有属性'get_all_permissions'中收到这些错误 - I am getting these error in " AttributeError: 'NoneType' object has no attribute 'get_all_permissions' 我收到类似 AttributeError: 'NoneType' object has no attribute 'text' 的错误 - I am getting error like AttributeError: 'NoneType' object has no attribute 'text' 我不断收到错误:AttributeError: 'NoneType' object has no attribute 'strip' - I keep getting the error: AttributeError: 'NoneType' object has no attribute 'strip'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM