先來介紹一下背景吧,我在學習一份關於附在一份文獻上的源碼,因為需要stanfordnlp包,所以我就想着安裝一下。本來認為挺簡單的一件事情,結果花費了好久的時間。所以寫篇文章記錄一下。
我使用的是pip來安裝stanfordnlp,然后有如下圖的錯誤提示:
簡單來說就是找不到匹配的torch版本
試用了很多的方法,最后解決方法是:
首先,pip3 install torch===1.3.1 torchvision===0.4.2 -f
https://download.pytorch.org/whl/torch_stable.html
接着,pip install stanfordnlp
大功告成,親測有效