记录下bertopic库安装遇见的种种问题

首先是直接运行 pip install bertopic

报错:ERROR: Could not build wheels for hdbscan, which is required to install pyproject.toml-based project

先更换安装命令为 pip install bertopic -i https://pypi.tuna.tsinghua.edu.cn/simple/

仍然报错,故去上方网站搜索bertopic下载到本地,运行命令

pip install "C:\Users\Helianthus\Downloads\bertopic-0.9.4-py2.py3-none-any.whl"

报错:Building wheel for hdbscan (pyproject.toml) ... error
  error: subprocess-exited-with-error

观察到这样一行:

error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/

猜测是电脑没有安装Microsoft Visual C++导致报错,故去网站

https://wiki.python.org/moin/WindowsCompilers#Microsoft_Visual_C.2B-.2B-_14.x_with_Visual_Studio_2022_.28x86.2C_x64.2C_ARM.2C_ARM64.29 下载Visual Studio Community 2022

勾选Python进行下载,下载后继续运行

pip install "C:\Users\Helianthus\Downloads\bertopic-0.9.4-py2.py3-none-any.whl"

报错:ERROR: Cannot uninstall 'PyYAML'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.

运行命令:

pip3 install "C:\Users\Helianthus\Downloads\bertopic-0.9.4-py2.py3-none-any.whl" --ignore-installed PyYAML

结果如下:

可以看到不管咋说bertopic已经成功安装上了,在jupyter下运行一条调试命令报错:

Something is wrong with the numpy installation. While importing we detected an older version of numpy in ['D:\\Anaconda\\lib\\site-packages\\numpy']. One method of fixing this is to repeatedly uninstall numpy until none is found, then reinstall this version.

接下来在prompt下uninstall与install numpy时会报错

下一步将各个库更新一下再看下运行结果。。。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值