0

i want to make recommendation location but i have problem with my sklearn. i have been update my library but it is not work. i use python 2.7 with anaconda

enter image description here

please help me :D it is my library code.

from sklearn.cluster import KMeans
import numpy as np
import pandas as pd
from sklearn.cross_validation import train_test_split
from sklearn.metrics import accuracy_score, recall_score, precision_score
from sklearn import svm
from numpy import algorithms, environment
import plotly
import plotly.plotly as py
import plotly.graph_objs as go
obayhan
  • 1,636
  • 18
  • 35
Sulis
  • 1
  • 1
  • 3

2 Answers2

0

Windows

  • Open command prompt(as admin)
  • enter 'pip install -U scikit-learn'

Unix

  • Open terminal
  • Enter 'sudo pip install -U scikit-learn'
Tilak Putta
  • 758
  • 4
  • 18
0

The default Anaconda distribution should have all of these packages, so it's likely your interpreter is looking for packages in a different spot. This is controlled by the PYTHONPATH system variable, which tell it where to look for package imports.

Anaconda can set this correctly for you during (re)installation if you choose to update the variable. You can also edit it yourself--how you do so depends on your OS.

To view the variable in python for troubleshooting: How do I find out my python path using python? This should point to a directory on you computer containing the package files.

Community
  • 1
  • 1
Nathan Thompson
  • 335
  • 1
  • 10