I am trying to run some code on python 2 and I keep getting this error No module named model_selection
. I checked and for some reason the sklearn on my python2 is version 0.17 but when I try to update, it says that I already have an updated version but that is for python 3. How do I specifically update sklearn for python 2?
Error I get when running pip install -U scikit-learn
: Requirement already up-to-date: scikit-learn in /home/ruven/anaconda3/lib/python3.6/site-packages (0.19.2)
Error I get when running python2.7 -m pip install -U scikit-learn
:
Collecting scikit-learn
Using cached https://files.pythonhosted.org/packages/bc/67/370aa248f54769a56216707ad7b9af19745e85a603fafa47bde353f327fb/scikit_learn-0.19.2-cp27-cp27mu-manylinux1_x86_64.whl
Installing collected packages: scikit-learn
Found existing installation: scikit-learn 0.17
Cannot uninstall 'scikit-learn'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.