自学内容网 自学内容网

jetson agx orin 的pytorch、torchvision安装

首先使用conda创建一个虚拟环境,python=3.8,只能使用3.8,因为后面使用NVIDIA提供的torch包对py环境有要求。
使用

conda search cudatoolkit

查看自己支持的cuda版本,我选的11.4
然后进入英伟达的torch网站
pytorch英伟达下载地址

下载后

pip install torch-1.12.0a0+nnnnnnnnnnnn_linux_aarch64.whl

这个时候torch就安装完了,还需要安装torchvision
pytorch和torchvision版本对应
找到对应版本,torchvision需要自己下载编译

git clone --branch v0.16.0 https://github.com/pytorch/vision torchvision

下载自己对应版本的torchvision,然后在终端的虚拟环境输入下列命令

cd torchvision
export BUILD_VERSION=v0.16.0

在终端的虚拟环境输入下列命令

python3 setup.py install --user

编译完成即可。

参考:参考链接


原文地址:https://blog.csdn.net/weixin_51315141/article/details/143036233

免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!