CondaInstall

= Why use conda? =

Conda is a cross-platform package manager (supporting Linux, macOS, and Windows) that makes it easy to install GNU Radio, its dependencies, and out-of-tree modules in a self-contained environment. Conda lets you create independent environments with their own sets of packages, and those environments are separate from your system installation and other package managers. If you've struggled with installing GNU Radio by other methods, you want to use GNU Radio with other bleeding-edge software available through conda-forge, or you want to try out a new version without affecting your tried-and-true system installation, conda may be right for you! In addition to GNU Radio, there are also related software packages you can install that may be of interest.

= Installation using conda =

The conda packages for GNU Radio are unofficial and supported through volunteer effort within the conda-forge community. Conda-forge is a community-maintained collection of conda packages where anyone with interest can help improve or add packages. Please report and discuss any packaging-specific issues with the maintainers at the gnuradio feedstock. If you'd like to help or are interested in adding other related software to conda-forge (e.g. out-of-tree modules), get in touch with the maintainers through Github.

Step 1: Install conda itself
First, you will need to install a base conda distribution so that you can use the  program to create an environment and install the GNU Radio packages. If you already have this and can run  on a command line or use the Anaconda Navigator to install packages, skip to the next step.

If this is your first time using conda, we recommend miniforge for the base installation. This provides a minimal environment to run  that is already set up to pull packages from conda-forge (which is where you can find GNU Radio). Download and install miniforge by following the instructions at. Installers for many different platforms are available there, but the most relevant are the following:


 * Linux x86_64
 * macOS x86_64
 * Windows x86_64

For Linux and macOS, run the downloaded installer from a console and follow the prompts:


 * (Linux)
 * (macOS)

By default, this will install miniforge to your home directory at  and allow you to use the   command from any console.

For Windows, double click on the downloaded installer executable and follow the prompts. By default, this will install miniforge to your user directory at  and add a "Miniforge Prompt" entry to your start menu. Running the "Miniforge Prompt" should bring up a console window where your base conda environment is activated and you can use the  command.

This guide provides a nice introduction to using conda generally; it may help you better understand the rest of these instructions, but it is not necessary to read.

(Optional, experts only) It may be convenient to now install  in your base environment and use it in place of the   command. Mamba is a third-party alternative to conda that is written in C instead of Python, and its main benefit is faster dependency resolution when installing packages. If you do install mamba, you can simply use the  command in place of   for all subsequent steps.

Step 2: Create an environment for GNU Radio
It's almost never a good idea to install additional packages to your base conda environment because their dependencies may interfere with conda's own dependencies. We recommend creating an environment specifically for GNU Radio and related packages. From a console with the base conda environment activated, run

to create an empty environment called "gnuradio". Enter the environment by activating it with the command:

Before installing the GNU Radio packages, we need to ensure that the environment is set up to look for packages from conda-forge:

Now you're ready to actually install GNU Radio!

Step 3: Install GNU Radio from conda-forge
GNU Radio on conda-forge is split into a few subpackages. Most users will be happy with the full installation provided by the  metapackage. From within your activated "gnuradio" environment (previous step), run the command:

This will install the latest available version of GNU Radio along with the latest version of Python. If you want a specific version of the  package (get a list of possibilities from  ), you can specify it like

If you want a specific version of Python, you can install it before  or specify them together like

To upgrade all non-Python packages in your environment to their latest available versions, use the upgrade command

The  metapackage installs all of the following subpackages:



If you don't want all of those and their dependencies, you can install the ones you'd like individually like

to get only the core package (always a dependency) and UHD support without any GUI elements.

= Using GNU Radio from conda =

You can use GNU Radio from a conda environment in mostly the same way that it is normally used, provided that you have activated your "gnuradio" environment (or whatever name you might give it). So from a fresh console, you'll need to run

and then use whatever GNU Radio scripts or programs you want, for instance

Windows users will find that GNU Radio Companion can also be launched from the Start Menu. Running it from there will first activate the appropriate environment, so all you need to do is click the icon!

GNU Radio will have access to the Python installed into the conda environment, and not any other installation. If you need specific Python packages to use with GNU Radio, just install them into the environment using. As a last resort,  or manual installation  can also be used, but these will not be managed by conda and you'll have to be careful to manage your environment.

= Installing related software =

Beyond core GNU Radio and the in-tree modules, some out-of-tree modules and related software have also been packaged for conda. This is a non-exhaustive list of other packages that you can install using the  command:



If you have other hardware or OOT modules that you'd like to see supported, first search Anaconda Cloud to see if a package not listed above already exists on conda-forge or another channel. If it doesn't, you can create your own package recipe and submit it to conda-forge (see the documentation at for details) and/or get in touch with the maintainers of the existing packages to see if they would be willing to help.

= Installing pre-release versions =

Sometimes, pre-release versions of GNU Radio will also be available through conda-forge (on a best effort basis!). So these don't get installed over release versions, they are provided on a separate channel label. For a release candidate ("RC" pre-release), that channel is. You can install from a special channel by using the  flag with , as in

Since extra packages are unlikely to also be available and compatible with a pre-release version, we recommend creating a separate environment first and installing the pre-release there. So for example,

= Building GNU Radio from source within a conda environment =

Take note that this is an advanced topic that is likely to be of interest to developers only. It is possible to install all of GNU Radio's dependencies into a conda environment and then build GNU Radio from source. This can be useful for development, where the source is being updated and rebuilds are frequent.

Create a development environment
Create and activate a development environment called "grdev":

Install all of the dependencies (or a subset of them if you like):


 * (Linux)
 * (macOS)
 * (Windows)

It might also be necessary or useful to install conda-forge's compiler package  to ensure binary compatibility with the conda-forge ecosystem.

Pass necessary arguments to CMake
With the development environment activated and from a build directory within the source directory, call  with the following arguments:


 * (Linux)
 * (macOS)
 * (Windows)

In time, hopefully this list of argument can be trimmed down to only specifying the prefix.

Build as normal
Proceed with building and installing as normal:

= FAQ =

It is likely that you have another GNU Radio or Python installation interfering with your conda environment. See ModuleNotFoundError for more information on this problem in general. Verify that your Python path points to the correct directory by running
 * When I try to run GNU Radio, why do I get a ModuleNotFoundError (no module named ...)?

and inspecting the output. If other directories come before your conda environment Python directory, you may have to modify your  environment variable. If your conda environment Python directory does not appear at all, make sure that your  environment variable is set correctly to run the   executable from your conda environment and not some other installation of Python.

Provided you've installed the appropriate package for your hardware through conda (e.g. ) and the accompanying GNU Radio blocks (e.g.  ), it's likely that you still need to follow extra steps to get your hardware running. Consult the documentation for your device and follow the additional steps it recommends beyond installing the basic software. For instance, with Ettus UHD-supported devices, you'll need to download the images package into the conda environment by running the  script provided by. Make sure your device is visible and usable outside of GNU Radio before trying to track down any GR-specific problem.
 * Why can't GNU Radio find my hardware device?