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

Users who have contributed to this file

@PMeira @nipunbatra
87 lines (64 sloc) 2.36 KB

Installing NILMTK

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

After Anaconda has been installed, open up the terminal (Unix) or Anaconda prompt (Windows):

  1. NILMTK should work fine in the base environment, but we recommend creating a new environment where NILMTK and related dependecies are installed.

    conda create --name nilmtk-env 
  2. Add conda-forge to list of channels to be searched for packages.

    conda config --add channels conda-forge
  3. Activate the new nilmtk-env environment.

    conda activate nilmtk-env
  4. Install the NILMTK package

    conda install -c nilmtk nilmtk
  5. The installed package import for python/ ipython can be tested in the terminal using the following command:

    python -c "import nilmtk"


    ipython -c "import nilmtk"

    Note: This might show DepreciationWarning due to the imp module. That will be fixed in a future release.

    • Alternatively, you can also run your IDE in nilmtk-env from: Anaconda Navigator > "Applications on" dropdown > nilmtk-env To check the current environment variables,

       import sys

      You will see an output similar to:

       3.6.7 | packaged by conda-forge | (default, Feb 28 2019, 09:07:38) 
       [GCC 7.3.0]
  6. Run your Python IDE from this environment, for example:

    jupyter notebook


  7. Import NILMTK in the IDE:

    import nilmtk

    The package modules can now be used.

  8. To deactivate this environment,

    conda deactivate

We recommend checking the Anaconda documentation about environments if the concept is new to you.

Conda development snapshots

If you want to try out tagged development versions, you can follow the normal installation guide but use the following command for the NILMTK installation (step 4):

conda install -c nilmtk -c nilmtk/label/dev nilmtk
You can’t perform that action at this time.