Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
2 contributors

Users who have contributed to this file

@PMeira @nipunbatra
61 lines (40 sloc) 2.19 KB

Install NILMTK

We recommend using Anaconda, which bundles togther most of the required packages. NILMTK requires Python 3.6+ due to the module it depends upon.

If you prefer to avoid Anaconda, you could install most packages using pip but you will require a compatible C compiler for your Python distribution. Be sure to use the package versions listed in the file environment-dev.yml.

Before anything, install Anaconda. If you already have it installed, be sure to keep it updated.

The following instructions are general enough to work on Linux, macOS or Windows (run the commands on a Powershell session). Remember to adapt it to your environment.

  1. Install Git, if not available. On Linux, install using your distribution package manager, e.g.:
sudo apt-get install git

On Windows, download and installation the official Git client.

Alternatively, if you do not have administrator access, you can install Git directly on the Anaconda distribution running conda install git.

  1. Download NILMTK:
cd ~
git clone https://github.com/nilmtk/nilmtk.git
cd nilmtk

The next step creates a separate environment for NILMTK (see the Anaconda documentation), using NILMTK's environment-dev.yml text file to define which packages need to be installed. If you have a previous nilmtk-env environment, please remove it first (conda env remove -n nilmtk-env).

conda env create -f environment-dev.yml
conda activate nilmtk-env

Next we will install nilm_metadata (for development, we recommend installing from the repository, even though there is a conda package available):

cd ~
git clone https://github.com/nilmtk/nilm_metadata/
cd nilm_metadata
python setup.py develop
cd ..

Change back to your nilmtk directory and install NILMTK:

cd ~/nilmtk
python setup.py develop

Run the unit tests:

nosetests

Then, work away on NILMTK! When you are done, just do conda deactivate to deactivate the nilmtk-env (or just clone the terminal/session).

You can’t perform that action at this time.