Error building scikit-learn on Jetson Xavier NX

I am trying to build scikit-learn =0.13.1 on my Jetson board. This particular version had following dependencies:
i. python>=2.6
ii. setuptools
iii. numpy >= 1.3
iv. scipy>=0.7
v. c,c++ complier

I met these dependencies:
i. python=3.6.9
ii. setuptool =57.4.0
iii. numpy= 1.16.1
iv. scipy = 1.2.0
v. gcc, g++ and gfortran compilers installed

I am able to build scikit-image but scikit-learn is getting failed in build. I am attaching a screenshot of the error

. Can someone please suggest what might be missing?

Hi,

Could you share the complete error log with us?
It seems that the real cause is on the top of the error.

More, we have a container with scikit-learn pre-installed.
You can use it to get the library directly.
https://ngc.nvidia.com/catalog/containers/nvidia:l4t-ml
Thanks.

Please see these two images. From whatever resources I have got, this error seems to come from gfortran but it’s already installed.

Hi,

error: ‘PyFrameObject {aka struct _frame}’ has no member named ‘f_tstate’; did you mean ‘f_trace’?

It seems that the scikit-learn version is too old.
Is v0.13.1 essential for you?

We can build v0.24.2 with the following commands without issue.

$ sudo apt-get install python3-pip
$ sudo apt-get install -y build-essential libatlas-base-dev gfortran
$ pip3 install cython
$ sudo pip3 install scikit-learn

Thanks.