I’v installed PyTorch v1.12.0 successfully on Jetson AGX Orin DevKit and the after verification with
torch.cuda.is_available() it turns out that Torch can see and make use of the GPU. Now I’m trying to install torchvision v0.13.0 as mentioned in (pre-built PyTorch pip wheel installers for Python on Jetson)
PyTorch v1.12 - torchvision v0.13.0
All have been installed in a python venv
I have a problem with installing torchvision with :
$ sudo apt-get install libjpeg-dev zlib1g-dev libpython3-dev libavcodec-dev libavformat-dev libswscale-dev $ git clone --branch <version> https://github.com/pytorch/vision torchvision # see below for version of torchvision to download $ cd torchvision $ export BUILD_VERSION=0.x.0 # where 0.x.0 is the torchvision version $ python3 setup.py install --user
I’ve done the first step and cloned the repository and
export BUILD_VERSION=0.13.0 but when I’m trying to run the setup file with
python3 setup.py install --user it tells me the following:
Building wheel torchvision-0.13.0 PNG found: True libpng version: 1.6.37 Building torchvision with PNG image support libpng include path: /usr/include/libpng16 Running build on conda-build: False Running build on conda: False JPEG found: True Building torchvision with JPEG image support NVJPEG found: False FFmpeg found: False video codec found: False The installed version of ffmpeg is missing the header file 'bsf.h' which is required for GPU video decoding. Please install the latest ffmpeg from conda-forge channel: `conda install -c conda-forge ffmpeg`. running install Checking .pth file support in /home/naser/.local/lib/python3.8/site-packages/ /home/naser/torch_yolo/bin/python3 -E -c pass TEST FAILED: /home/naser/.local/lib/python3.8/site-packages/ does NOT support .pth files error: bad install directory or PYTHONPATH You are attempting to install a package to a directory that is not on PYTHONPATH and which Python does not read ".pth" files from. The installation directory you specified (via --install-dir, --prefix, or the distutils default setting) was: /home/naser/.local/lib/python3.8/site-packages/ and your PYTHONPATH environment variable currently contains: '' Here are some of your options for correcting the problem: * You can choose a different installation directory, i.e., one that is on PYTHONPATH or supports .pth files * You can add the installation directory to the PYTHONPATH environment variable. (It must then also be on PYTHONPATH whenever you run Python and want to use the package(s) you are installing.) * You can set up the installation directory to support ".pth" files by using one of the approaches described here: https://setuptools.readthedocs.io/en/latest/easy_install.html#custom-installation-locations Please make the appropriate changes for your system and try again.
I think the problem is in
export BUILD_VERSION=0.13.0 but I can’t figure out what is the problem.