运行xgboost 时出现的问题 from scipy.misc import comb ImportError: cannot import name 'comb'的

mac2026-09-30  6

因为scipy.misc中的comb位置已经移到scipy.special中,所以,将文件中错误的import修改就会没问题了。

例如,我在import librosa时,会报错: cannot import name 'comb'

修改两处都要: 修改lib\site-packages\sklearn\model_selection\_split.py中from scipy.misc import comb为from scipy.special import comb 修改lib\site-packages\sklearn\metrics\cluster\supervised.py中from scipy.misc import comb为from scipy.special import comb  

最新回复(0)