A step-by-step manual for installing NILMTK

1 minute read

Published:

In this manual, we explain how to install NILMTK based on sources from NILMTK User Guide and NILMTK Documentation. We thank Nipun Batra for providing such useful information on Github.

Linux / Mac OS

Install Conda

Before downloading NILMTK, you need to install a proper development environment. We propose the use of Conda:

With over 6 million users, the open source Anaconda Distribution is the easiest way to do Python data science and machine learning. It includes hundreds of popular data science packages and the conda package and virtual environment manager for Windows, Linux, and MacOS. Conda makes it quick and easy to install, run, and upgrade complex data science and machine learning environments like Scikit-learn, TensorFlow, and SciPy. Anaconda Distribution is the foundation of millions of data science projects as well as Amazon Web Services’ Machine Learning AMIs and Anaconda for Microsoft on Azure and Windows.

Download Anaconda for Python 2.7 here.

In order to install Anaconda, run the installation in the command line:

cd Downloads/
sudo bash Anaconda2-5.1.0-Linux-x86_64.run -u

This will start the installation process, which will guide you through the several steps. Install Conda and test the installation by executing the command conda in the command prompt.

Bad Interpreter: No such file or directory

In case the command conda results in an error, apply the following fix:

cd /home/user/
nano .bashrc

add the line: export PATH=~/anaconda2/bin:$PATH

Finally, execute the command:

source .bashrc

Before you proceed any further, check if you have GIT installed on your machine. If it’s missing, install it:

sudo apt-get install git

NILMTK

Create NILMTK environment in Conda.

In the first step, download NILMTK YML file

Open the command prompt and execute:

cd downloads/
conda env  create  -f=nilmtk.yml

Alternatively, open Anaconda Navigator:

Create Jupyter kernel env

Run the following command in the prompt:

source activate nilmtk-env
python -m ipykernel install --user --name nilmtk-env --display-name "Python (nilmtk)"

Now you are ready to go!

Optional: PyCharm IDE

In development environments such as PyCharm, you should be able to integrate nilmtk-env now.

To be extended…