Installing GNU Radio
By the end of this chapter GNU Radio is
on the machine, and you have run the one
command that proves it and names its
version. The lab installed it for real,
on the machine that built this guide;
its transcript is
gnu-radio-lab/transcripts/t00-install.txt.
The three honest routes
Your system's packages. On Debian
and Ubuntu, sudo apt install gnuradio
installs the whole toolkit — runtime,
Companion, and the standard block
libraries — in one step, at the version
your distribution carries. That is the
route the lab took: Ubuntu 24.04's
repositories offered GNU Radio
3.10.9.2, and the lab took it as it
came. The versions move slowly in
distribution repositories, which for
learning is a feature: the guide you
are reading, the videos you will find,
and your install stay in step.
A Python environment. pip install
gnuradio (or a conda environment, the
route the project's own documentation
favours for the newest releases) puts a
current GNU Radio inside a Python
virtual environment, isolated from the
system's. Choose it when you need a
feature newer than your distribution's
version, and accept the trade: more
moving parts between you and chapter 6.
Building from source. Real, possible, and not this guide's route: an hour of compiling to arrive where the package manager arrives in minutes. Nothing in the chapters ahead needs it.
Whichever route: install the Companion with it (the system package includes it), because chapter 5 reads flowgraphs through it even though the lab's running is headless.
The proof command
$ gnuradio-config-info --version
It prints one line — the lab's machine
answered 3.10.9.2 — and that line is
worth more than a successful install
log. It proves the runtime answers,
and it names the version every later
chapter's behaviour should be judged
against. GNU Radio changes between
releases: block names move, defaults
shift. When a chapter and your machine
disagree, this line is the first
evidence — chapter 16 makes a habit
of asking for it.
Two more answers worth having on the same occasion:
$ gnuradio-config-info --prefix
$ which grcc gnuradio-companion
The prefix says where the toolkit
lives; grcc is the Companion's
command-line compiler (chapter 5 uses
it to prove a flowgraph file sound
without opening a window), and
gnuradio-companion is the editor
itself.
A word about size and patience
GNU Radio is not a small install: the toolkit, its DSP libraries and its graphical parts run to the better part of a gigabyte of packages on a bare system. On the lab's small machine the package install took some minutes and asked for nothing but disk. That is the whole difficulty of this chapter, and it is deliberately front-loaded: from here on, every chapter runs something.
Check: gnuradio-config-info
--version prints a version, and
python3 -c "from gnuradio import gr"
runs silent and clean. Chapter 5 opens
the Companion and reads a flowgraph
the way the machine reads it.