InstallingGR

= From Binaries =

The recommended way to install GNU Radio on most platforms is using already available binary packages (see Ubuntu PPA Installation). For some platforms there are no binaries provided by available package managers or the GNU Radio project. In these cases please contact the maintainer of the package manager or the GNU Radio project to find a sensible way to provide binaries for your platform.

In addition to using binaries, GNU Radio can be installed:


 * 1) From source (for those who want full control)
 * 2) Using PyBOMBS (for those who want it built from source and/or installed to a specific directory using a script)

Linux
Most distributions contain a package named  or similar in their standard repositories. For most use cases it is enough to install this package and start developing.

The development of GNU Radio is can be fast-paced, and binaries provided by your distribution may be outdated. '''Do check if the version you're installing is up to date! Sometimes old versions are not updated in the packaging systems.''' If you find a bug in a older GNU Radio version, please check if the bug still exists in the newer version of GNU Radio before filing a new issue.

If the version shipped in your distribution is outdated please contact the corresponding maintainer to update it in the packaging system.

Here are examples of how to install GNU Radio in various Linux distributions (click the link under &quot;Distribution&quot; for more installation details):

On other distributions, simply use the appropriate package management command to install the  package and then please add it to this list. If you need newer versions or have a different platform please contact the package maintainer of your distribution or raise your issue on the mailing list.

Ubuntu PPA Installation
For Ubuntu, the latest builds (both released and pulled from master branch) are maintained as PPAs on launchpad. Be sure to uninstall any previously installed versions of gnuradio first.

To access the latest released version (currently 3.8.2.0), add the gnuradio/gnuradio-releases ppa (removing other gnuradio ppas if already configured)

$ sudo add-apt-repository ppa:gnuradio/gnuradio-releases

To access the latest from the master branch (currently pre 3.9 release), add the gnuradio/gnuradio-master ppa (removing other gnuradio ppas if already configured)

$ sudo add-apt-repository ppa:gnuradio/gnuradio-master

To access the 3.7 released version (legacy), add the gnuradio/gnuradio-releases-3.7 ppa (removing other gnuradio ppas if already configured)

$ sudo add-apt-repository ppa:gnuradio/gnuradio-releases-3.7

Then, update the apt sources, and install gnuradio $ sudo apt-get update $ sudo apt install gnuradio

Modtool on Ubuntu
NOTE: On released builds for Ubuntu 18 (bionic), there is an issue using gr_modtool after GNU Radio has been installed from the PPA. This is due to byte-compiled code that remains in the modtool templates after installation. To workaround this issue:

$ cd /usr/share/gnuradio/modtool/templates/gr-newmod $ sudo py3clean.

This issue does not appear for Ubuntu 19 and later packages

Fedora COPR Installation
Packages are available for Fedora 29,30,31 hosted under COPR:

https://copr.fedorainfracloud.org/coprs/gnuradio/

1. Add the repository:

-- For the latest released version: $ sudo dnf copr enable gnuradio/gnuradio-releases -- For the latest pull from git master: $ sudo dnf copr enable gnuradio/gnuradio-master

2. Install GNU Radio $ sudo dnf install gnuradio

Windows
Binary installers are now available for 3.8.0.0, download them here.

If you need to install GNU Radio from source refer to the Windows install guide.

Note: We do not officially support Windows. We do our best to provide installation instructions and work out build bugs on Windows when they are reported and patches received. As new versions of GNU Radio, its dependencies, and Windows itself come out, however, keeping all of them working together is beyond the scope of what the project currently supports. User updates to the above wiki installation instructions are very welcome.

Mac OS X
Refer to the Mac OS X install guide page.

= From Source =

Binary installation should be sufficient for most users, and certainly for anyone who is new to GNU Radio. However, if you have special requirements, want the latest version, or the binary packages are not working for you, you may want to install GNU Radio from source.

For the GNU Radio Master Branch
Since Volk is no longer considered as a submodule of GNU Radio (GNU Radio commit #80c04479da962d048d41165081b026aafdaa0316 ), you MUST FIRST install Volk, and then install GNU Radio.

The basic idea is the same, but instead of building Volk along with GNU Radio, you need to clone and build it separately. For this example, we will start in the home directory. You can, of course, use any directory you wish and the results will be the same.

Step 1: Installing Dependencies
Refer to this page for your specific Linux distro to find how to install dependencies. For example, on Ubuntu 20.04 use this command.

Step 2: Installing Volk


If you're running Linux, then always remember to do the following command after installing any library:

Step 3: Installing GNU Radio


Note: In the following command, it is very possible that not all tests pass. Generally any error is a sign of a missing dependency such as the Python interface to ZMQ or NumPy or SciPy, none of which are required for building GNU Radio but are required for testing.



Again, if you're running Linux, then always remember to do the following command after installing any library:

If you encounter "Cannot import gnuradio" error, then go to Finding the Python library to set your PYTHONPATH and LD_LIBRARY_PATH. After setting these environment variables, you need to do  again for the Linux dynamic library loader to find the just-installed GNU Radio libraries.

For GNU Radio 3.8 or Earlier
For this example, we will start in the home directory; you can, of course, use any directory you wish and the results will be the same.



Note: In the following command, change  to some other branch or tag if you want to build a different version of GNU Radio; see tags for tagged releases including pre-releases ("rc"). For branches, it's generally wise to stick with "master" (the default after cloning), and, currently:   or. Here we checkout the  branch, which contains the latest 3.8 release plus any fixes or augmentations to it that will be in the next 3.8 release.



Note: In the following command, you can use  to install GNU Radio into the PREFIX  ; if not specified, then the PREFIX is. See other CMake options in Common cmake flags.


 * (e.g. if you want to use 3 CPU cores during the build. To use 8 do -j8, to use 1 leave out the -j flag.)
 * (e.g. if you want to use 3 CPU cores during the build. To use 8 do -j8, to use 1 leave out the -j flag.)

If you're running Linux, then always remember to do the following command after installing any library:

Go to Finding the Python library to set your PYTHONPATH and LD_LIBRARY_PATH. After setting these environment variables, you need to do  again for the Linux dynamic library loader to find the just-installed GNU Radio libraries.

For Ubuntu 18.04
An easy way to install GNU Radio 3.8 on many Ubuntu systems is to use the following commands (note that this skips the setup for UHD hardware):



Once this is done, reboot your computer and GNU Radio should be all set for you.

Common cmake flags
For a list of additional cmake flags, as well as minimum versions of dependencies, see
 * This enables (or disables for =OFF) the GNU Radio component named XXX. You might not need all of them, and this way, you can compile quicker.
 * Install your stuff to XXX.
 * This causes gcc to add debug symbols to all binaries. Useful for debugging (otherwise, it decreases efficiency!)
 * This selects the Python version and executable to be used during build time and will determine which Python libraries will be used for building the Python bindings.

= Using PyBOMBS =

PyBOMBS is good at building GNU Radio, UHD, and various Out of Tree (OOT) modules from source and then installing into a specified user directory rather than in the system files. PyBOMBS detects the user's Operating System and loads all of the prerequisites in the first stage of the build.

The PyBOMBS documentation is in the PyBOMBS README.

= OK, it's installed, what now? =

If the installation worked without any trouble, you're ready to use GNU Radio! If you have no idea how to do that, the best place to start is with the Tutorials.

Optionally, you may run  on your terminal to help libvolk to determine the optimal kernels (may speed up GNU Radio).