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?:
Hi,
Sorry that it takes some time to figure out the dependencies.
Here are the detail building steps for scikit-image.
1. Dependencies
$ sudo apt-get install liblapack-dev gfortran
$ sudo apt-get install python3-pip
$ sudo pip3 install -U pip
$ sudo pip3 install Cython numpy
2. Scipy
$ wget https://github.com/scipy/scipy/releases/download/v1.3.3/scipy-1.3.3.tar.gz
$ tar -xzvf scipy-1.3.3.tar.gz scipy-1.3.3
$ cd scipy-1.3.3/
$ python3 setup.py install --user
3. Tiff
$ wget https://downlo…
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
system
Closed
October 25, 2023, 8:00am
11
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.