簡體   English   中英

通過Pip安裝Python hunspell軟件包失敗

[英]Python hunspell package installation via pip fails

hunspell python軟件包的安裝(通過pip)失敗,並出現以下錯誤:

hunspell.c:21:22: fatal error: hunspell.h: No such file or directory
 #include <hunspell.h>
                      ^
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

知道該怎么解決嗎?

嘗試sudo apt-get install hunspell-dev ,然后再次嘗試安裝hunspell(或pyhunspell)

pyhuspell的github頁面上的一個問題中引用了此問題: https : //github.com/blatinier/pyhunspell/issues/22

嘗試:

sudo apt-get install libhunspell-dev
pip install hunspell

...按照pyhunspell的github頁面(由John D提供)的同一線程中的建議進行: https : //github.com/blatinier/pyhunspell/issues/22

我無法安裝“ hunspell-dev”,但可以安裝libhunspell-dev。

這對我有用

sudo apt-get install libhunspell-dev
python3 -m pip install hunspell

或使用這個

https://pypi.org/project/CyHunspell/

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM