fastrtext是一个较难安装的程序包。
首先,运行intall.packages(fastrtext)玩不转
其次,运行install.packages("fastrtext", repos='https://mran.microsoft.com/snapshot/2019-02-01/')玩不转
再次,输入library(devtools) ; install_github(fastrtext)出现错误
Error in lapply(repo, github_remote, ref = ref, subdir = subdir, auth_token = auth_token, :
找不到对象'fastrtext'
第四,在https://codeload.github.com/pommedeterresautee/fastrtext/zip/refs/tags/0.2.0下载fastrtext包装上了,但加载时出现错误:install.packages("C:/Users/Administrator/Desktop/fastrtext-0.2.0.zip", repos = NULL, type = "win.binary", lib="C:/Program Files/R/R-4.0.3/library")
第五,预先装好git,在git执行https://fasttext.cc/docs/en/support.htmlhttps://fasttext.cc/docs/en/support.html的命令装fasttext,但执行make语句时失败
的提示装make,并在win10的path下设置make的环境变量
第七,重新执行第五步执行git的make命令
最后,再执行第二句就玩转fastrtext了
总结:fastrtext是一个联系r和fasttext的包。因此,需要预先装fasttest,但装fasttext要预装git,在git中装fasttext要运行make命令,也就要预装make。这样,用追随法找到最底层的问题,再由低祷告一层层像过五关斩六将那样就装上了fastrtext包。