I can import most of Scikitlearn using miniconda, but cannot get load_digits

32 views Asked by At

I only have miniconda, as i was unable to download anaconda in full, but I am able to import sklearn and hundreds of other programs normally. However, when I try and import the load_digits part, as follows

from sklearn.datasets import load_digits
digits = load_digits()
print(digits['DESCR'])

I get this error message

     69     # We are not importing the rest of scikit-learn during the build
     70     # process, as it may not be compiled yet

which prevents me from importing this specific graph. The same problem happens with GaussianProcessRegressor but most np forms of graphs import normally. Can someone explain what the problem is here?

I get the error message rather than the graphs automatically uploading like they should

1

There are 1 answers

0
Matt Hall On

It looks from the code as if this is something that can only happen while the package is being built. But if you are simply installing with conda then perhaps there's a bug in whatever version you have. Try switching to another version, e.g. (depending on your current version) with

conda install sklearn=1.3.1

And see if that fixes it.