728x90
jetson tx2 보드에 파이토치를 설치하시다 보면 많은 에러가 뜨고 공식사이트에서 제공하는 방식을 이용해도 잘되지 않은 경우가 발생된다.
밑의 방식대로 진행하다보면 파이토치를 정상적으로 jetson tx2 보드에 설치가 가능하다.
- pytorch version = 1.9.0
- torchvision version = 0.10.0
pytorch 설치
- wheel 방식
# install the dependencies (if not already onboard)
$ sudo apt-get install python3-pip libjpeg-dev libopenblas-dev libopenmpi-dev libomp-dev
$ sudo -H pip3 install future
$ sudo pip3 install -U --user wheel mock pillow
$ sudo -H pip3 install testresources
# above 58.3.0 you get version issues
$ sudo -H pip3 install setuptools==58.3.0
$ sudo -H pip3 install Cython
# install gdown to download from Google drive
$ sudo -H pip3 install gdown
# download the wheel
$ gdown https://drive.google.com/uc?id=1wzIDZEJ9oo62_H2oL7fYTp5_-NffCXzt
# install PyTorch 1.9.0
$ sudo -H pip3 install torch-1.9.0a0+gitd69c22d-cp36-cp36m-linux_aarch64.whl
# clean up
$ rm torch-1.9.0a0+gitd69c22d-cp36-cp36m-linux_aarch64.whl
-pip 방식
# get a fresh start
$ sudo apt-get update
$ sudo apt-get upgrade
# the dependencies
$ sudo apt-get install ninja-build git cmake
$ sudo apt-get install libjpeg-dev libopenmpi-dev libomp-dev ccache
$ sudo apt-get install libopenblas-dev libblas-dev libeigen3-dev
$ sudo pip3 install -U --user wheel mock pillow
$ sudo -H pip3 install testresources
# above 58.3.0 you get version issues
$ sudo -H pip3 install setuptools==58.3.0
$ sudo -H pip3 install scikit-build
# download PyTorch 1.9.0 with all its libraries
$ git clone -b v1.9.0 --depth=1 --recursive https://github.com/pytorch/pytorch.git
$ cd pytorch
# one command to install several dependencies in one go
# installs future, numpy, pyyaml, requests
# setuptools, six, typing_extensions, dataclasses
$ sudo pip3 install -r requirements.txt
torchvision 설치
Used with PyTorch 1.9.0
# the dependencies
$ sudo apt-get install libjpeg-dev zlib1g-dev libpython3-dev
$ sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev
$ sudo pip3 install -U pillow
# install gdown to download from Google drive, if not done yet
$ sudo -H pip3 install gdown
# download TorchVision 0.10.0
$ gdown https://drive.google.com/uc?id=1Q2NKBs2mqkk5puFmOX_pF40yp7t-eZ32
# install TorchVision 0.10.0
$ sudo -H pip3 install torchvision-0.10.0a0+300a8a4-cp36-cp36m-linux_aarch64.whl
# clean up
$ rm torchvision-0.10.0a0+300a8a4-cp36-cp36m-linux_aarch64.whl
다른 버전을 설치하고 싶으시면 아래의 주소를 이용하세요
https://qengineering.eu/install-pytorch-on-jetson-nano.html
728x90
'인공지능 > 기본설치' 카테고리의 다른 글
[anaconda] anaconda 환경에서 pytorch 간단히 설치하는 법 (0) | 2022.08.04 |
---|---|
[JETSON Board]NVIDIA JETSON NANO 보드 OS 설치 (0) | 2021.12.07 |
[tensorflow]텐서플로(tensorflow) 이전 버전 설치 (0) | 2020.11.24 |