When installing on Ubuntu Linux, you need to first install the dependencies using apt-get, and then use the pip installation, otherwise the normal scikit-learn installation will not work properly. See below:
Step 1. Verify that apt-get is updated .
Sudo apt-get update
Step 2. Installing the dependencies
sudo apt-get install build-essential python-dev python-setuptools python-numpy python-scipy libatlas-dev libatlas3gf-base
Step 3: Select Scikit Learn
pip install --user --install-option = "- prefix =" -U scikit-learn
Hope this helps!
source share