1 year ago

#67066

test-img

Nitcha

Fail to import scikit-learn due build error on Windows

After verifying all requirements exists I installed scikit-learn 1.0.2 using anaconda (python 3.9.5). Installation pass successfully, and I can import sklearn via anaconda prompt without any errors.

But when I trying to import sklearn from Spyder IDE I get the following error:

> -------------------------------------------------------------------------------------
> ImportError: No module named 'sklearn.__check_build._check_build'
> Contents of C:/Users/nyname/miniconda3/Lib/site-packages\sklearn\__check_build: setup.py                  
> _check_build.cp39-win_amd64.pyd__init__.py
> __pycache__

> 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. If you have used an installer, please check that
> it is suited for your Python version, your operating system and your
> platform

I tried to uninstall and install the packages on the following order - Numpy, Scipy, , Scikit-learn. Also tried upgraded Spyder version from v3 to 5.2.1, or to downgrade Scikit-learn to 0.23.1 but with no help.

When I try to run:`

my\sklearn\directory\\python setup.py install

I get the following errors:

> non-existing path in '__check_build': '_check_build.pyx' Appending
> sklearn.__check_build configuration to sklearn Ignoring attempt to set
> 'name' (from 'sklearn' to 'sklearn.__check_build')
.....
.....
> FileNotFoundError: [Errno 2] No such file or directory:'sklearn/utils/_seq_dataset.pyx.tp'

I will really appreciate any suggestion, I literally upgraded all my environment and followed every suggestion I found online.

scikit-learn

spyder

miniconda

scikit-learn

spyder

miniconda

0 Answers

Your Answer

Accepted video resources