How To Install Sci-kit Learn On Ubuntu 18.04

November 12, 2019 Liquid Web

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: 
https://www.liquidweb.com/kb/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

About the Author

Liquid Web

Liquid Web powers online content, commerce, and potential for SMB entrepreneurs and the designers, developers and digital agencies who create for them. Sign up for our newsletter to stay up to date with our latest content.

More Content by Liquid Web
Previous Video
How to Get Content from Clients On Time Without Using Email
How to Get Content from Clients On Time Without Using Email

Tired of waiting on clients to send content, then having to dig through endless email trails full of attach...

Next Video
How To Setup A Python Virtual Environment in Ubuntu 18.04
How To Setup A Python Virtual Environment in Ubuntu 18.04

In this video, we will do a walkthrough of how to set up a virtual environment on Ubuntu 18.04.

Learn What Qualities to Look for in Your Next Host in Our New Guide!

Download Now