本文主要是介绍安装DCNv3时报错NotADirectoryError: [Errno 20] Not a directory: ‘hipconfig‘,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
解决方法:
1、查看报错信息,找到这一条:和这有关的cuda_to_hip_mappings.py
2、然后去修改这个文件:anaconda3/envs/xxx/lib/python3.10/site-packages/torch/utils/hipify/cuda_to_hip_mappings.py
先cd跳入文件夹,再vim进去
3、添加一个NotADirectoryError
try:rocm_path = subprocess.check_output(["hipconfig", "--rocmpath"]).decode("utf-8")
except subprocess.CalledProcessError:print(f"Warning: hipconfig --rocmpath failed, assuming {rocm_path}")
# 修改这一行, 添加 NotADirectoryError
except (FileNotFoundError, PermissionError, NotADirectoryError ): # Do not print warning. This is okay. This file can also be imported for non-ROCm builds.pass
4、保存一下就可以了,然后就可以正常安装了
这篇关于安装DCNv3时报错NotADirectoryError: [Errno 20] Not a directory: ‘hipconfig‘的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!