pytorch3d安装:ImportError: libcudart.so.10.1: cannot open shared object file: No such file or director

报错信息

在使用pip install pytorch3d安装时,显示安装成功,但在运行代码时,报错:

from pytorch3d import _C
ImportError: libcudart.so.10.1: cannot open shared object file: No such file or directory

说明pytorch3d在安装过程中出错了。
原因:使用pip安装的时候,会下载编译好的pytorch3d进行安装,预编译的pytorch3d安装包并不匹配你的当前环境。

解决方案

按照github上pytorch3d的官方安装教程,从源码安装:
Building / installing from source.

1. 从github上直接安装

pip install "git+https://github.com/facebookresearch/pytorch3d.git"

由于我无法成功使用git,放弃这个安装方式。

2. 从本地的clone里安装

首先需要从github上把pytorch3d下载到本地,再进行安装。

(1)下载pytorch3d

git clone https://github.com/facebookresearch/pytorch3d.git

或者直接在github上点击下载

(2)本地安装

cd pytorch3d
pip install -e .

参考:https://blog.csdn.net/YnullW/article/details/126961883

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值