+5 votes
in Machine Learning by (28.4k points)
recategorized by
I have an old version of the scikit-learn (sklearn) on my Ubuntu machine. How can I upgrade it to the latest version?

1 Answer

+1 vote
by (48.8k points)

To upgrade the scikit-learn (sklearn) package to the latest version on the Ubuntu machine, you can run one of the following commands on the terminal.

sudo pip install scikit-learn --upgrade

sudo pip install -U scikit-learn

 If the upgrade is successful, you will see the message: "successfully installed xxxx" on the terminal.

You can check its version from the Python command line:

>>> import sklearn
>>> sklearn.__version__