scikit learn似乎很管用,但当我这么做的时候:
from sklearn.feature_selection import VarianceThreshold
我得到了以下错误:
ImportError: cannot import name VarianceThreshold
如何绕过这个?我是Python的新手,所以我不知道该怎么做。在
我玩弄了我的进口商品的顺序,正如这里所建议的:ImportError: Cannot import name X,但没有运气。在
^{pr2}$我也得到了这个:
code/python/k_means/serial_version$ python -c 'import sklearn; print(sklearn.VarianceThreshold)'
Traceback (most recent call last):
File "<string>", line 1, in <module>
AttributeError: 'module' object has no attribute 'VarianceThreshold'
版本:
>>> import sklearn
>>> sklearn.__version__
'0.14.1'
您可以通过捕捉异常来绕过
如果只想捕获属性错误异常,请使用下面的方法
^{pr2}$相关问题 更多 >
编程相关推荐