赞
踩
解决方法:
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、保存一下就可以了,然后就可以正常安装了
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。