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):
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
Add conda-forge to list of channels to be searched for packages.
conda config --add channels conda-forge
Activate the new nilmtk-env environment.
conda activate nilmtk-env
Install the NILMTK package
conda install -c nilmtk nilmtk
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 print(sys.executable) print(sys.version)
You will see an output similar to:
/home/ayush/anaconda3/envs/nilmtk-env/bin/python 3.6.7 | packaged by conda-forge | (default, Feb 28 2019, 09:07:38) [GCC 7.3.0]
Run your Python IDE from this environment, for example:
Import NILMTK in the IDE:
The package modules can now be used.
To deactivate this environment,
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):
```bash conda install -c nilmtk -c nilmtk/label/dev nilmtk ```