dusty-nv / jetson-inference

Hello AI World guide to deploying deep-learning inference networks and deep vision primitives with TensorRT and NVIDIA Jetson.
https://developer.nvidia.com/embedded/twodaystoademo
MIT License
7.77k stars 2.97k forks source link

import torch error with python3 #570

Closed flurpo closed 1 year ago

flurpo commented 4 years ago

I ran a test on my torch installation after installing jetson-inference.

import torch works perfectly with python but with python3;

tx2:/jetson-inference/build/aarch64/bin$ python3 Python 3.6.9 (default, Apr 18 2020, 01:56:04) [GCC 8.4.0] on linux Type "help", "copyright", "credits" or "license" for more information.

import torch Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python3.6/dist-packages/torch/init.py", line 79, in from torch._C import * RuntimeError: module compiled against API version 0xc but this version of numpy is 0xb

Has anyone run into this before? Best.

hyattbaker commented 4 years ago

@flurpo ended up moving back to 4.4 DP and installing the wheel for pytorch and the torchvisin per @dusty-nv's advice in the previous issue we were on. Currently, retraining with pytorch and ResNet-18 per the example using python 3.6. I will say moving back and forth between Jetpack 4.3 and 4.4 seemed a little buggy for me, with SDK manager failing to flash or just hanging. I ended up having to delete all the downloads from SDK Manager and restarting the manager a couple of times.

flurpo commented 4 years ago

@hyattbaker -thanks for the quick comment...I've moved back to 4.3. Still have the issue above but running ok with Py2.7 for the moment. I'll just have to table the problem until I can solve some of my other issues. We are certainly learning something going back and forth between Jetpacks!