sentence transformers安装

sentence-transformers安装

(成功解决:OSError: [WinError 127] 找不到指定的程序。重新安装sentence-transformers)

1.安装torch

(1)使用 anaconda prompt 新建虚拟环境

conda create -n pytorch1.7 python==3.7

(2)安装 torch 及其附带的包(这步很关键!包的版本要对应!不然之后会报错)

pip install torch===1.7.0 torchvision===0.8.1 torchaudio===0.7.0 -f https://download.pytorch.org/whl/torch_stable.html

2.安装Transformers

pip install transformers==4.7.0

3.安装sentence-transformers

pip install sentence-transformers

你可能感兴趣的:(no,error!,python,pytorch,transformer)