Install SciKit in Jetson AGX orin

Hi,
I have installed scikit with the following command:
pip install -U scikit-learn

I can import scikit in python scripts, but when I try to use this commands:

from sklearn.model_selection import train_test_split
din_train, din_test, dout_train, dout_test = train_test_split(din,dout,
test_size=0.2,
random_state=42)

The following errors appear:

Contents of /home/user/.local/lib/python3.8/site-packages/sklearn/__check_build:
init.py pycache _check_build.cpython-38-aarch64-linux-gnu.so


It seems that scikit-learn has not been built correctly.

If you have installed scikit-learn from source, please do not forget
to build the package before using it: run python setup.py install or
make in the source directory.

Hi,

Just want to confirm.
Is your default Python version Python 3?

python --version

Thanks

Yes, my Python version is 3.8.10

Should I follow instructions here?:

I have tried to follow the instructions there but the same error appears.

Hello,

If i import sklearn before tensorflow, then the error disappears.

2 Likes

Hi,

Thanks for the update.

Is changing the import order WAR okay for you?
It sounds like some compatibility problem between scikit-learn and TensorFlow.

Thanks.

Hi,
Yes when I change the import order then no error appears. My current version of scikit-learn is 1.3.1.

Thanks

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.