gpt4 book ai didi

python - 导入错误:没有名为 '_catboost' 的模块

转载 作者:行者123 更新时间:2023-11-30 09:18:53 25 4
gpt4 key购买 nike

我使用的是 python 3.4 并安装了 catboost 库,但是当我尝试导入时,它显示以下错误。

<小时/>
ImportError                               Traceback (most recent call last)
c:\python34\lib\site-packages\catboost\core.py in <module>()
17 try:
---> 18 from _catboost import _PoolBase, _CatBoostBase, CatboostError,
_cv, _set_logger, _reset_logger
19 except ImportError:

ImportError: No module named '_catboost'

During handling of the above exception, another exception occurred:

ImportError Traceback (most recent call last)
<ipython-input-51-f6570a454eaf> in <module>()
----> 1 from catboost import CatBoostClassifier,cv, Pool

c:\python34\lib\site-packages\catboost\__init__.py in <module>()
----> 1 from .core import Pool, CatBoost, CatBoostClassifier,
CatBoostRegressor, CatboostError, cv # noqa
2 try:
3 from .widget import CatboostIpythonWidget # noqa
4 except:
5 pass

c:\python34\lib\site-packages\catboost\core.py in <module>()
18 from _catboost import _PoolBase, _CatBoostBase, CatboostError, _cv,
_set_logger, _reset_logger
19 except ImportError:
---> 20 from ._catboost import _PoolBase, _CatBoostBase, CatboostError,
_cv, _set_logger, _reset_logger
21
22 from contextlib import contextmanager

ImportError: DLL load failed: The specified module could not be found.

最佳答案

因为您使用的是 python 3.x,所以您需要使用

pip3 install catboost

不是

pip install catboost

关于python - 导入错误:没有名为 '_catboost' 的模块,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47294900/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com