pip install github上资源库报错,解决 surface-distance计算库调用中的一些问题解决fatal: destination path ‘surface-distance

我们在运行代码中发现,头文件如下代码

import surface_distance
from surface_distance import metrics



            ssd = surface_distance.compute_surface_distances((seg == 1)[0, 0].cpu().numpy(),
                                                             (masks==1)[0, 0].cpu().numpy(),
                                                             spacing_mm=spacing[0].numpy())
            nsd = metrics.compute_surface_dice_at_tolerance(ssd, args.tolerance)  

直接运行会报错,需要安装库

我们直接查询到github的链接

https://github.com/google-deepmind/surface-distance

直接按照github链接安装

git clone https://github.com/deepmind/surface-distance.git
pip install surface-distance/

报错:fatal: destination path 'surface-distance' already exists and is not an empty directory.

这时候需要设置网络代理

在cmd命令行中输入

git config --global http.proxy http://127.0.0.1:7890

 再次按照github链接安装

git clone https://github.com/deepmind/surface-distance.git
pip install surface-distance/

就可以成功装上库!!

再次调用头文件就不会报错

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值