+4 votes
in Programming Languages by (18.8k points)
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

0 votes
by (33.0k 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__