解决Windows下pip安装bertopic报错:Failed building wheel for hdbscan

在安装bertopic的过程中,遇到了Failed building wheel for hdbscan,我先去网站:https://www.lfd.uci.edu/~gohlke/pythonlibs/#hdbscan

下载了hdbscan‑0.8.28‑cp310‑cp310‑win_amd64.whl,并且用pip进行了本地安装,依然报错。

然后仔细阅读报错信息,发现是build报错,我在Linux系统下并不会报这个错误,只会在Windows下报错,怀疑是缺少C++相关的编译/构建工具,于是去该网站下载Microsoft C++ 生成工具:https://visualstudio.microsoft.com/zh-hans/visual-cpp-build-tools/

安装后,勾选如下内容:
安装构建工具

再次运行:pip install bertopic,安装成功
成功安装bertopic

posted @ 2023-10-08 14:07  狛枫  阅读(161)  评论(0编辑  收藏  举报