I used sudo apt-get install python-numpy python-scipy python-matplotlib python-sklearn for scikit-learn installation on rPi3 but an old version was applied!

This old version installed (0.18) got output results complete diferent over same algorithms if compare with pip installation on Windows or Mac.

Trying to install new version of scikit-learn (0.20.1) usins pip command, the error bellow appear. What is wrong?

enter image description here

Please see the found errors here.

  • 4
    please dont post screen shots,its very hard to read usually. Copy the text and paste it in your question. It also helps if there is something in the output someone wants to look up to help you, they can also just copy the part they want to search for. Helps out everyone. – Chad G Nov 30 '18 at 21:47

You've got some missing dependencies.

Running sudo apt-get install gfortran libopenblas-dev liblapack-dev before re-running your failing sudo pip install scikit-learn command should resolve that.

Note: it took more than an hour to run this on my RPi3A+.

  • I have this dependences installed :( ... I'm trying sudo pip ignore-installed --force -U scikit-learn – user1801745 Dec 1 '18 at 11:20

Following the above directions worked for me using Raspberry Pi 3B+. I suspect something with the -U was playing poorly with the installation as I tried installing with sudo pip install -U scikit-learn and it didn't work.

sudo apt-get install gfortran libopenblas-dev liblapack-dev
sudo pip install scikit-learn

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.