Making a development evvironment for Mopidy.

We will be using virtualenvwrapper to create a workspace in a a virtual environment when working on mopidy. This isolates anything we do from the normal python environment. First of all make sure modpidy is not running:

sudo systemctl stop mopidy

Now install virtualenvwrapper software:

sudo pip install virtualenvwrapper

To complete the install you will need to edit your .bashrc file and reload it to add the definitions to your default environment.

nano ~/.bashrc

# Add these 3 lines at the end of .bashrc and save
    export WORKON_HOME=~/Envs
    mkdir -p $WORKON_HOME
    source /usr/local/bin/virtualenvwrapper.sh

Finally, ‘source’ the file to load the definitions to your environment (or reboot):

source ~/.bashrc

You can now install mopidy into the environment. This will make it easy