1

I've installed sklearn using pip install -U scikit-learn command and its successfully installed at c:\python27\lib\site-packages but when i'm importing from sklearn.cluster import KMeans it gives me error. Error Detail. I've checked the package C:\Python27\Lib\site-packages\sklearn and its there. How can I get rid of this.

numpy,scipy,sys

afaq
  • 109
  • 3
  • 11
  • Possible duplicate of [ImportError in importing from sklearn: cannot import name check\_build](https://stackoverflow.com/questions/15274696/importerror-in-importing-from-sklearn-cannot-import-name-check-build) – sascha Sep 08 '17 at 13:30
  • scipy is already installed in my case , other packages are installed . – afaq Sep 08 '17 at 13:39
  • It does not seem so. Do some test-import of numpy and scipy! (No offense, but a lot of people here do not seem to be able to detect if some install was successful or not!) – sascha Sep 08 '17 at 13:40
  • Yes I did . but are installed and I can import them successfully – afaq Sep 08 '17 at 13:42
  • Work through [this](https://github.com/scikit-learn/scikit-learn/issues/8461) and [this](https://github.com/scikit-learn/scikit-learn/issues/8461) – sascha Sep 08 '17 at 13:45
  • It seems something is wrong with the package. I've tried all methods mentioned in your answers apart from changing inside directory but it still stuck there – afaq Sep 08 '17 at 14:50

1 Answers1

1

Now with your screenshot given, here is the problem:

Now i see you are on windows and installing scipy there is hard. But please: take your time to search here on SO, as this is asked every day and the answer is still the same. Read the official docs and take a decision on which route to go (not pip install scipy!).

sascha
  • 32,238
  • 6
  • 68
  • 110
  • yes I'm trying to update scipy but getting error. after updating I hope I'll fix it. thanks – afaq Sep 08 '17 at 15:29
  • I told you. Do not use pip for updating scipy (on windows). I highly recommend anaconda, but Gohlke's binaries will do too. Read their install-docs. But as far as this question goes: it's answered. – sascha Sep 08 '17 at 15:31