ModuleNotFoundError: No module named ‘Levenshtein‘

ModuleNotFoundError: No module named ‘Levenshtein’

Levenshtein的包名称是python-Levenshtein。

使用conda装似乎有问题。如下报错

Collecting package metadata (current_repodata.json): failed

CondaHTTPError: HTTP 530 CONNECTION FAILED for url <https://conda.anaconda.org/ostrokach-forge/linux-64/repodata.json>
Elapsed: 00:03.204423
CF-RAY: 75f9333afe26f681-NRT

A remote server error occurred when trying to retrieve this URL.

A 500-type error (e.g. 500, 501, 502, 503, etc.) indicates the server failed to
fulfill a valid request.  The problem may be spurious, and will resolve itself if you
try your request again.  If the problem persists, consider notifying the maintainer
of the remote server.

正确方法
在对应虚拟环境下

pip install python-Levenshtein

注:可以通过pip -V查看pip指向的是哪个python,或者说指向的是哪个虚拟环境的python,以免装错。

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值