Friday 24 May 2019

Installing nussl - music signal processing

nussl (pronounced ["nuzzle"]  is a flexible, object oriented python audio source separation library created by the [Interactive Audio Lab] (http://music.cs.northwestern.edu/) at Northwestern University. At its core, nussl provides implementations of common source separation algorithms as well as an easy-to-use framework for prototyping and adding new algorithms. The aim of nussl is to create a low barrier to entry for using popular source separation algorithms, while also allowing the user fine tuned control of low-level parameters.

Steps to install nussl on Ubuntu 18.04 LTS
====================================
1) First we need to download Anaconda.  Go to  https://repo.anaconda.com/archive/ to download the latest version of Anaconda
After the download is done,  and compare it with the one on the Website, just to be sure.

2) Verify the MD5SUM
md5sum Anaconda2-2019.03-Linux-x86_64.sh

3) Install Anaconda
bash Anaconda2-2019.03-Linux-x86_64.sh

4) Activating the Installation
source ~/.bashrc

5) Use the conda command to test if installation & activation was successful.

conda list

6) Making an anaconda env
conda will create a new env named audio_test_env with numpy, scipy, and matplotlib installed in it. 

conda create --name audio_test_env numpy scipy matplotlib python=2.7           

or 

conda create --name audio_test_env numpy scipy matplotlib python=3.6       


7) Now, we need to activate the env. Run the following command:
$ source activate audio_test_env
(audio_test_env) $
Now we’re in the conda env. 

8) From within the conda env, you can do a regular pip install

pip install nussl
or:
sudo pip install nussl

9) We can exit conda env with the following command:
(audio_test_env) $ source deactivate

or 

(audio_test_env) $ conda deactivate

10) Install additional Python packages to a virtual environment.
conda install -n yourenvname [package]

11)To delete a conda environment, enter the following, where yourenvname is the name of the environment you wish to delete.
conda remove -n yourenvname --all

conda remove -n yourenvname --all

12) updating conda
conda update --all

13) Dependencies for nussl ( in the virtual environment)
(audio_test_env) $ pip install musdb
(audio_test_env) $ pip install museval

14) Installing spyder in python 2.7 environment
(audio_test_env) $ conda install spyder

15) Spyder environment managing
conda install spyder-kernels=0.*
if using conda/Anaconda, or

pip install spyder-kernels==0.*
if using pip/virtualenv.

After installing via either method, run the following command inside the same environment:

python -c "import sys; print(sys.executable)"
and copy the path returned by that command (it should end in python, pythonw, python.exe or pythonw.exe, depending on your operating system).

Deactivate that environment, activate the one in which Spyder is installed (if you've installed it in its own environment) and start Spyder as you normally would.

After Spyder has started, navigate to Preferences > Python Interpreter > Use the following interpreter and paste the path from Step 3 into the text box.

Start a new IPython console. All packages installed in your myenv environment should be available there.

References
==========
https://www.ceos3c.com/open-source/install-anaconda-ubuntu-18-04/
https://www.digitalocean.com/community/tutorials/how-to-install-the-anaconda-python-distribution-on-ubuntu-18-04
https://uoa-eresearch.github.io/eresearch-cookbook/recipe/2014/11/20/conda
https://interactiveaudiolab.github.io/nussl/getting_started/install.html#anaconda-env