安裝fasttext的一系列問題(全)
環(huán)境配置:windows10+python3.10
前言:Gensim中的fasttext不能做文本分類,對于想學(xué)習(xí)fasttext進行文本分類、情感分析的同學(xué)還是必須下載Facebook的fasttext
報錯一:Failed building wheel for fasttext
解決方案
step1 下載對應(yīng)的wheels文件
在該python libs
(或者粘貼該鏈接https://www.lfd.uci.edu/~gohlke/pythonlibs/#fasttext)搜索fasttext
下載whl文件,文件名: fasttext-0.9.2-cp310-cp310-win_amd64.whl提示:下載了多個嘗試發(fā)現(xiàn)只有上面這個whl 可以成功,cp10不清楚是否對應(yīng)Python的版本,大家可以優(yōu)先嘗試 如果報錯:whl is not a supported wheel on this platform.嘗試其他whl
step2 安裝fasttext
在文件下載目錄下 pip install fasttext-0.9.2-cp310-cp310-win_amd64.whl
報錯二:error: Microsoft Visual C++ 14.0 or greater is required.
解決方案
step1 下載Microsoft C++ Build Tools
下載Microsoft C++ Build Tools https://visualstudio.microsoft.com/zh-hant/visual-cpp-build-tools/
step2 下載后重新在對應(yīng)目錄下執(zhí)行pip
pip install fasttext-0.9.2-cp310-cp310-win_amd64.whl
參考來源:https://blog.csdn.net/vans05/article/details/11699444文章來源:http://www.zghlxwxcb.cn/news/detail-456534.html
總結(jié)
上述可以解決大部分問題,如果依然有問題可以參考以下鏈接:文章來源地址http://www.zghlxwxcb.cn/news/detail-456534.html
- pycham用pip命令安裝第三方庫出現(xiàn)error: command ‘C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\: link
- error: command C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\link.exe : link
到了這里,關(guān)于安裝fasttext的一系列問題(全)的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!