Building wheels for collected packages: mmcv, mmcv-full 卡住

2024-06-20 01:52

本文主要是介绍Building wheels for collected packages: mmcv, mmcv-full 卡住,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

安装 anime-face-detector 的时候遇到一个问题:Installation takes forever #1386:在构建mmcv-full时卡住,这里分享下解决方法(安装 mmcv 同理,将下面命令中的 mmcv-full 替换成 mmcv)

具体表现如下:

image-20240615224613696

如果需要指定版本,修改命令中的 mmcv-full:mmcv-full=={mmcv_version}
例:anime-face-detector 需要的版本 >= 1.3.8, <=1.4.0

... install mmcv-full==1.3.8

方法1

官方文档推荐方法

pip install -U openmim
mim install mmcv-full

方法2

命令行

根据官方文档,获取对应的CUDA和PyTorch版本进行下载(Python版本在下面):

# 获取CUDA版本
cuda_version=$(python3 -c "import torch; print(torch.version.cuda.replace('.', ''))")# 获取PyTorch版本
torch_version=$(python3 -c "import torch; print(torch.__version__.split('+')[0].replace('.', ''))")# 构造安装命令
install_command="pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu${cuda_version}/torch${torch_version}/index.html"# 检查安装命令
echo "安装命令: ${install_command}"# 执行安装命令
eval ${install_command}

Python版本

import torch
import subprocess# 获取当前的CUDA和PyTorch版本
cuda_version = torch.version.cuda.replace('.', '')
torch_version = torch.__version__.split('+')[0].replace('.', '')# 构造安装命令
install_command = f"pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu{cuda_version}/torch{torch_version}/index.html"# 打印并执行安装命令
print("安装命令:", install_command)
subprocess.check_call(install_command, shell=True)

如果没有对应的预编译文件的话,需要一定的时间构建,等待即可。

image-20240616220406613

这篇关于Building wheels for collected packages: mmcv, mmcv-full 卡住的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/1076766

相关文章

MySQL报错sql_mode=only_full_group_by的问题解决

《MySQL报错sql_mode=only_full_group_by的问题解决》本文主要介绍了MySQL报错sql_mode=only_full_group_by的问题解决,文中通过示例代码介绍的非... 目录报错信息DataGrip 报错还原Navicat 报错还原报错原因解决方案查看当前 sql mo

Kafka 为了避免 Full GC,竟然还在发送端设计了内存池,自己管理内存,太巧妙了...

一、开篇引出一个 Full Gc 的问题 在上一篇文章中,我们讲到了 Kafka 发送消息的八个流程,并且着重讲了 Kafka 封装了一个内存结构,把每个分区的消息封装成批次,缓存到内存里。 如下图所示: 上图中,整体是一个 Map 结构,Map 的 key 是分区,Map 的值是一个队列;队列里有一个个的小批次,里面是很多消息。 这样好处就是可以一次性的把消息发送出去,不至于来一条发送一条,

#error: Building MFC application with /MD[d] (CRT dll version) requires MFC shared dll version

昨天编译文件时出现了Building MFC application with /MD[d] (CRT dll version)requires MFC shared dll version~~~~的错误。   在网上很容易找到了解决的方案,公布如下:   对着你的项目点击右键,依次选择:属性、配置属性、常规,然后右边有个“项目默认值”,下面有个MFC的使用,选择“在共享 DLL 中使

【Mysql】系统服务启动访问报错问题处理:this is incompatible with sql_mode=only_full_group_by

一、背景: 本来已经正常运行的平台,突然有一天由于对服务器进行部分操作迁移,发现jar可以正常启动,但是访问功能一直报错,监控后台日志后,发现了问题: 报错的具体信息如下: Caused by: java.sql.SQLSyntaxErrorException: Expression #1 of SELECT list is not in GROUP BY clause and conta

【HDU】5033 Building 单调栈

传送门:【HDU】5033 Building 题目分析:就单调栈用叉积左右维护一个上凸壳就好了。。。 代码如下: #include <cstdio>#include <cstring>#include <algorithm>#include <cmath>using namespace std ;typedef long long LL ;#define rep

The remote endpoint was in state [TEXT_FULL_WRITING] which is an invalid state for called method 已解决

前面有个webSocket自动断开连接的问题,已解决,请见博客: webSocket java.io.EOFException: null 增加心跳机制解决 然后又报了一个错: java.lang.IllegalStateException: The remote endpoint was in state [TEXT_FULL_WRITING] which is an invalid st

解决报错【ERROR: Could not install packages due to an OSError: [WinError 5] 拒绝访问。】

1、问题发生 用pip安装时出现报错【ERROR: Could not install packages due to an OSError: [WinError 5] 拒绝访问。: 'c:\\programdata\\anaconda3\\lib\\site-packages\\__pycache__\\typing_extensions.cpython-39.pyc' Consider u

编程修炼之github利器Github Packages 开发者福音

前几天在GitHub闲逛,突然发现了Github Packages,当时还想这是什么东东,于是点开链接 https://docs.github.com/en/packages/using-github-packages-with-your-projects-ecosystem/using-github-packages-with-github-actions 之后发现,哎呀,真香~~~ 包有好几种

Building Materials

From 建材 https://baike.baidu.com/item/%E5%BB%BA%E6%9D%90/4776273?fr=ge_ala 建材 building materials 土木工程 civil engineering 建筑工程 constructional engineering 结构材料 STRUCTURAL MATERIALS 木材 timber 竹材 bamboo w