• Register
1 vote
65 views

Problem:

I installed scikit-learn. When I try to run again:

sudo pip install -U scikit-learn

I get this message proving again that installation is ok:

Requirement already up-to-date: scikit-learn in /home/mebegueradj/.local/lib/python2.7/site-packages

Still, I can’t import it. How to resolve this problem?

15.3k points

Please log in or register to answer this question.

1 Answer

0 votes

Solution:

First of all, make sure you’ve installed both the python and pip same version. As per your screenshot, I can see you’ve installed python2.7. 

In Ubuntu 16.04 and later the Python3 version of python-sklearn can be installed from the default Ubuntu repositories with the following command:

sudo apt install python3-sklearn

 

94.3k points