Import SVM Classifier trained with sklearn on Jetson TX1

I have done the following:

  1. Trained a one class classifier in Python using sklearn (svm.OneClassClassifier())
  2. Dumped the model using joblib dump into a .joblib file

Then I deployed the .joblib file on the Jetson TX1.

Now I am trying to import it using load from joblib

joblib and sklearn are installed on the JetsonTX1
joblib - pip3 install joblib
sklearn - sudo apt install python3-sklearn

But I get the following error when I try to load the model for inference on the Jetson TX1

Traceback (most recent call last):
File “”, line 19, in
clf = load(“oneclass_hog.joblib”)
File “/home/nvidia/.local/lib/python3.5/site-packages/joblib/”, line 598, in load
obj = _unpickle(fobj, filename, mmap_mode)
File “/home/nvidia/.local/lib/python3.5/site-packages/joblib/”, line 526, in _unpickle
obj = unpickler.load()
File “/usr/lib/python3.5/”, line 1039, in load
File “/usr/lib/python3.5/”, line 1334, in load_global
klass = self.find_class(module, name)
File “/usr/lib/python3.5/”, line 1384, in find_class
import(module, level=0)
File “/usr/lib/python3/dist-packages/sklearn/svm/”, line 13, in
from .classes import SVC, NuSVC, SVR, NuSVR, OneClassSVM, LinearSVC,
File “/usr/lib/python3/dist-packages/sklearn/svm/”, line 4, in
from .base import _fit_liblinear, BaseSVC, BaseLibSVM
File “/usr/lib/python3/dist-packages/sklearn/svm/”, line 12, in
from …multiclass import _ovr_decision_function
File “/usr/lib/python3/dist-packages/sklearn/”, line 44, in
from .metrics.pairwise import euclidean_distances
File “/usr/lib/python3/dist-packages/sklearn/metrics/”, line 33, in
from . import cluster
File “/usr/lib/python3/dist-packages/sklearn/metrics/cluster/”, line 19, in
from .unsupervised import silhouette_samples
File “/usr/lib/python3/dist-packages/sklearn/metrics/cluster/”, line 10, in
from …pairwise import pairwise_distances
File “/usr/lib/python3/dist-packages/sklearn/metrics/”, line 27, in
from …externals.joblib import parallel
ImportError: cannot import name ‘parallel’

Any ideas? Any suggestions to try an alternative way to transfer and use the classifier on Jetson TX1 are also welcome!
Note: The code which is failing ( is working absolutely fine on my personal computer, its failing only on the Jetson.


The error indicates a missing library:

ImportError: cannot import name 'parallel'

Could you try this command:

sudo pip install <b>-U</b> scikit-learn



Thanks a lot for your response.

Installation of scikit-learn is not working on the Jetson TX1 using pip.

This is the error message I get when I try to install it with the command you posted.
Can’t rollback scipy, nothing uninstalled.
Command “/usr/bin/python -u -c “import setuptools, tokenize;file=’/tmp/pip-build-XoU7LO/scipy/’;exec(compile(getattr(tokenize, ‘open’, open)(file).read().replace(’\r\n’, ‘\n’), file, ‘exec’))” install --record /tmp/pip-Od9q1Q-record/install-record.txt --single-version-externally-managed --compile” failed with error code 1 in /tmp/pip-build-XoU7LO/scipy/



I was able to get it working, used the following commands:

sudo pip3 install --upgrade setuptools
sudo pip3 install -U setuptools
sudo apt-get install libpcap-dev libpq-dev
sudo pip3 install cython
sudo pip3 install git+

Found them on the following post related to Jetson Xavier but it worked on the TX1 too.


Good to know this : )