问题描述
我在外壳程序中键入了pip install pyenchant
,但是它引发了两个Traceback错误:
I typed in pip install pyenchant
into my shell, but it raised two Traceback errors:
Traceback (most recent call last):
File "<string>", line 16, in <module>
File "/private/var/folders/q4/l70hdqjd5db2n2bdj69qrwz40000gq/T/pip_build_prernauppal/pyenchant/setup.py", line 195, in <module>
import enchant
File "enchant/__init__.py", line 90, in <module>
from enchant import _enchant as _e
File "enchant/_enchant.py", line 133, in <module>
raise ImportError("enchant C library not found")
ImportError: enchant C library not found
2:
Traceback (most recent call last):
File "<string>", line 16, in <module>
File "/private/var/folders/q4/l70hdqjd5db2n2bdj69qrwz40000gq/T/pip_build_prernauppal/pyenchant/setup.py", line 195, in <module>
import enchant
File "enchant/__init__.py", line 90, in <module>
from enchant import _enchant as _e
File "enchant/_enchant.py", line 133, in <module>
raise ImportError("enchant C library not found")
ImportError: enchant C library not found
----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /private/var/folders/q4/l70hdqjd5db2n2bdj69qrwz40000gq/T/pip_build_prernauppal/pyenchant
我在Mac上安装了python 2.7默认设置,但仍然无法正常工作.我已经看过,但它无法回答我的问题,因为easy_install pyenchant
会引发更多错误.
I have python 2.7 default installed on my mac, but it still isn't working. I have already looked at Unable to install pyenchant-1.6.5 for python 2.7 on Mac OSX Lion but it doesn't answer my question, as easy_install pyenchant
raises even more errors.
推荐答案
您需要安装enchant
,它是一个C库.您可以使用 Homebrew 来进行这种程序包管理.只需输入:
You need to install enchant
, which is a C library. You can use Homebrew, to do this kind of package management. Just enter:
brew install enchant
在尝试点安装pyenchant
之前,您应该没事.
Before trying to pip install pyenchant
and you should be fine.
这篇关于“找不到附魔C库";在OSX上使用pip安装pyenchant时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!