树莓派pip install openvino-dev 出现error: subprocess-exited-with-error

发现是安装editdistance包时出现错误
直接去pypi官网下载pip安装包提示 is not a supported wheel on this platform.

解决方法:去网上下载源码

editdistance-0.6.2源码包

解压安装
tar -zxf 压缩包名
进入editdistance-0.6.2安装
sudo python setup.py install
安装时可能会出现 ValueError: ‘editdistance/bycython.pyx’ doesn’t match any files

添加editdistance/bycython.pyx文件

# distutils: language = c++
# distutils: sources = editdistance/_editdistance.cpp

from libc.stdlib cimport malloc, free
# from libc.stdint cimport int64_t

cdef extern from "./_editdistance.h":
    ctypedef int int64_t
    unsigned int edit_distance(const int64_t *a, const unsigned int asize, const int64_t *b, const unsigned int bsize)

cpdef unsigned int eval(object a, object b) except 0xffffffffffffffff:
    cdef unsigned int i, dist
    cdef int64_t *al = <int64_t *>malloc(len(a) * sizeof(int64_t))
    for i in range(len(a)):
        al[i] = hash(a[i])
    cdef int64_t *bl = <int64_t *>malloc(len(b) * sizeof(int64_t))
    for i in range(len(b)):
        bl[i] = hash(b[i])
    dist = edit_distance(al, len(a), bl, len(b))
    free(al)
    free(bl)
    return dist
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值