/ml_talk_hioa

Primary LanguageJupyter Notebook

Machine Learning - A very Gentle Introduction

Install libraries with pip

(inspiration from this page)

For users that are not sudoers it is possible to install libraries by using the --user option of the pipcommand

> pip install --user <lib>

The libraries will be installed in the ~/.local/binpath. In order to run them, there is the need of including this path in the environment var PATH:

> export PATH=$PATH:~/.local/bin

or

> export PATH=$HOME/.local/bin:$PATH

Using virtual environment

(inspiration from this page)

Using virtual environment is a good way to keep your personal space clean and installing libraries at your needs, in your virtual environment.

  1. Initialize a python3 virtual environment in your directory of choice:

> virtualenv -p python3 <venv_dir>

  1. Activate the virtual environment:

> source <venv_dir>/bin/activate

  1. Now you can install whatever python dependencies you need (using pip3 for python3), and run your program

  2. To deactivate the virtualenvironment:

> deactivate

Install and Use Jupyter Notebook

  1. Install ipython

> pip2 install ipython > pip2 install jupyter

  1. Run

> jupyter notebook

Install Other libraries

> pip install numpy

> pip install pandas

> pip install sklearn