python - 如何在python中导入外部库?

标签 python

谁能帮我详细了解下载和导入名为 PyEnchant 的外部库的过程,以检查单词的拼写是否是有效的英文单词

最佳答案

你必须安装它

pip install pyenchant

文档中的简单用法示例:

import enchant
d = enchant.Dict("en_US")
d.check("Hello") # Returns True
d.check("Helo")  # Returns False

要安装 pip,请参阅:https://pip.pypa.io/en/latest/installing.html#install-pip

关于python - 如何在python中导入外部库?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24380160/

相关文章:

python - 使用 PyQT Python 显示 EMG(肌电图)

python - BadValueError : Property X must be a str or unicode instance, 不是元组(更新时,而不是创建时)

python - Flake8 提示 "Undefined Variable"关于内置函数

python - 如何在pandas中按正数或负数对数据进行分组

python - 将带有单位(100kb,32MB)的大小表示法转换为 Python 中的字节数

python - Python 2.7 中有什么类似于 Go 的 `time.Tick` 或 Netty 的 `HashedWheelTimer` 吗?

python - 当尝试执行cgi脚本时,出现错误: "[WinError 193] %1 is not a valid Win32 application"

python - 使用 docker-py 从现有容器运行 docker 容器

python - 装饰一个 python 类,使得大多数方法在有条件时引发异常

python - plotly :带有实时图表的破折号按钮不起作用