How To Install Sci-kit Learn On Ubuntu 18.04


In this tutorial, we are going to walk through how to install scikit-learn on an Ubuntu 18.04 server. We are going to walk through the installation both in a virtual environment with the Python package manager, Pip, and via Anaconda.

Commands used:

apt-get update -y
mkdir machine_learning
cd machine_learning
python3 -m venv scikit_is_cool
source scikit_is_cool/bin/activate
pip install numpy scipy joblib matplotlib scikit-image pandas
pip install -U scikit-learn
python

snippet
==============
from sklearn import datasets
iris = datasets.load_iris()
digits = datasets.load_digits()
print(digits.data)
==============

Ctrl+D (to exit python shell)
deactivate
conda create –name conda-scikit scikit-learn
Y –> then Enter
conda activate conda-scikit
python

snippet
==============
from sklearn import datasets
iris = datasets.load_iris()
digits = datasets.load_digits()
print(digits.data)
==============

The related article for this article can be found here:

How to Install Scikit-Learn on Ubuntu 18.04

For more information about this and other topics, visit us at https://www.liquidweb.com/kb/
For more information about our products, visit: https://www.liquidweb.com/products/

Video by: Justin Palmer


Duration: 3:58
Publisher: Liquid Web
You can watch this video also at the source.


Furlow consulting