Ubuntu

How to Install Pyradio on Ubuntu 20.04

Written in Python, Pyradio is a free and convenient command-line application for streaming internet radio straight from your Linux console. With Pyradio, you can play, edit, add and switch between your preferred list of online radio stations. Pyradio uses MPlayer for playback by default and runs not only on Linux but Windows, Mac and even Raspberry Pi. In this guide, we look at how you can install Pyradio on Ubuntu 20.04.

There are two main ways that you can accomplish this. You can install from snap packages or compile from source. Let’s have a look at each installation method in turn.

Prerequisites

To install Pyradio, ensure you have the following set of prerequisites:

1. MPlayer or VLC media player

2. Pip package manager

Install Pyradio from Snap

Installing Pyradio from snap is quite a straightforward process. By default, Ubuntu 18.04 and later versions come with snapd daemon already installed. Snapd is a daemon that usually handles snap packages.

If, for whatever reason, snapd is not present install it using the command:

$ sudo apt update
$ sudo apt install snapd

Next, install Pyradio from snap as shown

$ sudo snap install pyradio

Install Pyradio from source code

The other approach is to build Pyradio from source code. To accomplish this, we are going to clone Pyradio’s git repository

$ git clone https://github.com/coderholic/pyradio.git

Next, navigate into the cloned folder

$ cd pyradio

Then build from source as shown.

$ sudo python3 setup.py build

Once the build process is complete, run the following command to complete the installation from source.

$ sudo python3 setup.py install

This should only take a few seconds to complete. Once done, you can verify the version of Pyradio installed as follows.

$ pyradio --version

Launching Pyradio

To launch Pyradio, head over to the console or terminal and switch to root user. Then execute the command:

# pyradio --play

This opens a console-based interface with a list of available online radio stations that you can listen to. Feel free to scroll through and press ‘ENTER’ to select your online radio station of choice.

To get a list of available command-line options, run the pyradio command with the -h option.

$ pyradio -h

Conclusion

If a change in the music you listen to is what you need, then Pyradio is what you need. It provides an array of radio stations in a wide variety of music genres that will offer a much-needed change from your music collection. It’s simple to install and use and you can conveniently install it across all major Linux distributions. For more information about Pyradio including installation on other computing platforms and command-line controls, visit the Pyradio Github page.

Similar Posts