You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

在Anaconda环境安装NewsSentiment、Rust及sentencepiece遇报错求助

解决Anaconda PyTorch环境安装NewsSentiment的依赖问题

1. 修复Rust编译器缺失(tokenizers依赖)

pip install rust安装的不是正经的Rust编译器,直接用官方rustup安装:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

安装完成后重启终端,或执行source $HOME/.cargo/env加载环境变量,验证安装:

rustc --version

2. 修复sentencepiece头文件缺失问题

避免pip从源码编译sentencepiece,用conda安装预编译包:
先激活你的PyTorch环境:

conda activate pytorch

然后安装sentencepiece:

conda install -c conda-forge sentencepiece

3. 修复pysam构建的FileNotFoundError

同样用conda安装预编译的pysam,跳过源码构建:

conda install -c bioconda pysam

最终安装NewsSentiment

在激活的环境中执行:

pip install NewsSentiment

内容的提问来源于stack exchange,提问作者Yooshinhee

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.06 01:08:12