简体   繁体   中英

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.

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. I solved it by changing the Python version from 3.9 to 3.8 or 3.7

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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