InstallingGR: Difference between revisions

From GNU Radio
Jump to navigation Jump to search
(reversed order of 'cd gnuradio' and 'git checkout')
m (Update radioconda version and links)
 
(180 intermediate revisions by 23 users not shown)
Line 1: Line 1:
= From Binaries =
<div style="float:right">
 
{{Template:BeginnerTutorials}}
The recommended way to install GNU Radio on most platforms is using already available binary packages. For some platforms there are no binaries provided by available package managers or the GNU Radio project. In these cases please contact maintainer of the package manager or the GNU Radio project to find a sensible way to provide binaries for your platform.
</div>
 
= Quick Start =
In addition to using binaries, GNU Radio can be installed:
{| class="wikitable"
 
|+
# '''[[#From_Source|From source]]''' (for those who want full control)
! Platform !! Method !! GNU Radio version
# '''[[#Using_PyBOMBS|Using PyBOMBS]]''' (for those who want it built from source and/or installed to a specific directory using a script)
<!-- ======================================================================================================================================================================== -->
# '''[[#Bootable_DVD_with_GNU_Radio_Pre-installed|Premade Linux Live DVD/USB]]''' (great for someone without a Linux machine who just wants to try it out)
<!-- DEBIANOIDS ============================ -->
 
<!-- ======================================================================================================================================================================== -->
== Linux ==
|-
 
|rowspan=3 style="background-color:#eaecf0;"| [[File:Debian.png|32px|middle|link=]] '''Debian''' ≥12<br>[[File:Ubuntu.png|32px|middle|link=]] '''Ubuntu''' ≥22.04<br>[[File:LinuxMint.png|32px|middle|link=]] '''Linux Mint''' ≥21.1<br>[[File:RaspberryPi.png|32px|middle|link=]]'''Raspberry Pi OS'''<sub>64-bit</sub> ≥2021-10-30
Most distributions contain a package named <code>gnuradio</code> or similar in their standard repositories. For most use cases it is enough to install this package and start developing.
|rowspan=3| <syntaxhighlight lang="shell">sudo apt-get install gnuradio</syntaxhighlight>
 
||<div style="min-width: 25ch; display: flex; justify-content: space-between; flex-flow: row wrap;"><div style="min-width: 12ch; clear: none;">Ubuntu 22.04:</div><div>v3.10.1.1</div></div>
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 it.
|-
 
||<div style="min-width: 25ch; display: flex; justify-content: space-between; flex-flow: row wrap;"><div style="min-width: 12ch; clear: none;">Debian 12:</div><div>v3.10.5.1</div></div>
If the version shipped in your distribution is outdated please contact the corresponding maintainer to update it in the packaging system.
|-
 
||<div style="min-width: 25ch; display: flex; justify-content: space-between; flex-flow: row wrap;"><div style="min-width: 12ch; clear: none;">Ubuntu 23.10:</div><div>v3.10.7.0</div></div>
Examples of how to install GNU Radio in various Linux distributions (click each one for more installation details):
<!-- ======================================================================================================================================================================== -->
{|class="wikitable" style="margin: auto; width: 90%;"
<!-- FEDORA ============================ -->
!scope="col"|Distribution
<!-- ======================================================================================================================================================================== -->
!scope="col"|Command
|-
| rowspan=3 style="background-color:#eaecf0;"| [[File:Fedora.png|32px|middle|link=]] '''Fedora''' ≥38
| rowspan=3 |
<syntaxhighlight lang="shell">
sudo dnf install gnuradio
</syntaxhighlight>
||<div style="min-width: 25ch; display: flex; justify-content: space-between; flex-flow: row wrap;"><div style="min-width: 12ch; clear: none;">Fedora 38:</div><div>v3.10.4.0</div></div>
|-
|-
| [[UbuntuInstall|Debian/Ubuntu and derivates]]
||<div style="min-width: 25ch; display: flex; justify-content: space-between; flex-flow: row wrap;"><div style="min-width: 12ch; clear: none;">Fedora 39:</div><div>v3.10.6.0</div></div>
| <pre>$ apt install gnuradio</pre>
|-
|-
| [[FedoraInstall|Fedora]]
||<div style="min-width: 25ch; display: flex; justify-content: space-between; flex-flow: row wrap;"><div style="min-width: 12ch; clear: none;">Fedora 40:</div><div>v3.10.6.0</div></div>
| <pre>$ dnf install gnuradio</pre>
<!-- ======================================================================================================================================================================== -->
<!-- PPA UBUNTU ============================ -->
<!-- ======================================================================================================================================================================== -->
|-
|-
| RHEL/CentOS
|style="background-color:#eaecf0;"| [[File:Ubuntu.png|32px|middle|link=]] '''Ubuntu''' 20.04<br><small>Consider [https://ubuntu.com/tutorials/upgrading-ubuntu-desktop#1-before-you-start upgrading] your Ubuntu</small><br><br>[[File:Ubuntu.png|32px|middle|link=]] '''Ubuntu''' 22.04
| <pre>$ yum install gnuradio</pre>
||
<syntaxhighlight lang="shell">
sudo add-apt-repository ppa:gnuradio/gnuradio-releases
sudo apt-get update
sudo apt-get install gnuradio python3-packaging
</syntaxhighlight>
| style="text-align: right;" | v3.10.7.0
<!-- ======================================================================================================================================================================== -->
<!-- OTHER LINUXES ========================= -->
<!-- ======================================================================================================================================================================== -->
|-
|-
| [[ArchInstall|Archlinux]]
|style="background-color:#eaecf0;"| [[File:Tux.png|32px|middle|link=]] '''Other Linux Distros'''
| <pre>$ pacman -S gnuradio</pre>
||
<syntaxhighlight lang="shell">
sudo {apt,dnf,yay,emerge,…} install gnuradio
</syntaxhighlight>
| style="text-align: right;" | See [https://repology.org/project/gnuradio/badges this table]
|-
|-
| [[GentooInstall|Gentoo Linux]]
<!-- ======================================================================================================================================================================== -->
| <pre>$ emerge net-wireless/gnuradio</pre>
<!-- WINDOWS ========================= -->
<!-- ======================================================================================================================================================================== -->
|style="background-color:#eaecf0;"| [[File:Windows.png|32px|middle|link=]] '''Windows'''
||
Run [https://github.com/ryanvolz/radioconda/releases/download/2024.01.26/radioconda-2024.01.26-Windows-x86_64.exe Windows Radioconda installer]<br>
and launch "GNU Radio Companion" from the Start menu
| style="text-align: right;" rowspan=3 |v3.10.9.2
<!-- ======================================================================================================================================================================== -->
<!-- Mac OS ========================= -->
<!-- ======================================================================================================================================================================== -->
|-
|-
| [[SuseInstall|Suse Linux]]
|rowspan=2 style="background-color:#eaecf0;"| [[File:MacOS.png|32px|middle|link=]] '''macOS'''
|
| Intel: Run [https://github.com/ryanvolz/radioconda/releases/download/2024.01.26/radioconda-2024.01.26-MacOSX-x86_64.pkg macOS Radioconda installer (x86_64)]
|-
|-
| Apple Silicon: Run [https://github.com/ryanvolz/radioconda/releases/download/2024.01.26/radioconda-2024.01.26-MacOSX-arm64.pkg macOS Radioconda installer (aarch64)]
|}
|}


On other distributions, simply use the appropriate package management command to install the <code>gnuradio</code> package and 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.
= Other Installation Methods =


=== Ubuntu PPA Installation ===
== Platform-specific guides ==
For Ubuntu, the latest builds (both released and pulled from master branch) are maintained as PPAs on launchpad.  Be sure to uninstall gnuradio first.


To access the latest released version, add the gnuradio/gnuradio-releases ppa (removing other gnuradio ppas if already configured)
* [[LinuxInstall|Linux install guide]]
* [[WindowsInstall|Windows install guide]]
* [[MacInstall|Mac OS X install guide]]


<pre>$ sudo add-apt-repository ppa:gnuradio/gnuradio-releases</pre>
== Cross-platform guides ==


To access the latest from the master branch, add the gnuradio/gnuradio-master ppa (removing other gnuradio ppas if already configured)
* [[CondaInstall|Conda install guide]]
* [https://github.com/gnuradio/pybombs#pybombs PyBOMBS] - Note: We are no longer including PyBOMBS as a recommended method of installing GNU Radio, unless you want to play around with old versions (e.g. GR 3.7, 3.8, and OOTs of matching version)


<pre>$ sudo add-apt-repository ppa:gnuradio/gnuradio-master</pre>
== VMs and Live Images ==
Over the years a number of Live Images and VMs have been created.  There are currently no official versions but here are some current options:
*[https://github.com/bastibl/instant-gnuradio Instant GNU Radio] A customizable, programmatically generated VM and live environment for GNU Radio.
*[[UbuntuVM]] An Ubuntu 20.04 virtual machine image with GNU Radio 3.8.2.0, Fosphor, GQRX, and several other useful pieces of software. (Created using Instant GNU Radio)


Then, update the apt sources, and install gnuradio
= OK, it's installed, what now? =
<pre>$ sudo apt-get update gnuradio</pre>
<pre>$ sudo apt install gnuradio</pre>
 
== Windows ==
 
Binary installers are now available for 3.7.13.5, download them [http://www.gcndevelopment.com/gnuradio/downloads.htm here].<br />
If you need to install GNU Radio from source refer to the [[WindowsInstall|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 [[MacInstall|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.
 
== Notes ==
 
* By default GNU Radio will be installed in the /usr/local directory.
* Running and developing out-of-tree modules does not require GNU Radio to be installed from source.
* If you are using Ubuntu, see [[UbuntuInstall#Install_the_Pre-Requisites]] for installing dependencies / pre-requisites.
* If you want to use GNU Radio with a USRP, install the UHD package or follow the [https://files.ettus.com/manual/page_build_guide.html UHD Manual Build Guide].
* To install on a Raspberry Pi, see [[InstallingGRFromSource on Raspberry Pi]].
 
== To install system wide ==
 
<p>It doesn't matter which directory you start in; it can be home, ~/Downloads, etc.; but <b>gnuradio will become a sub-directory of that starting point.</b></p>
* <code>git clone --recursive https://github.com/gnuradio/gnuradio.git</code>
* <code>cd gnuradio</code>
* <code>git checkout maint-3.8</code> # change `maint-3.8` if you want to use a different version; see [https://github.com/gnuradio/gnuradio/releases releases]
* <code>mkdir build</code>
* <code>cd build</code>
* <code>cmake -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=/usr/bin/python3 ../</code>  # see other options below
* Note: if your computer has multiple cores, you can use the -j option for 'make' to speed compilation, e.g. <code>make -j3</code> but specify one less than the total so the system does not appear to 'freeze'.
* <code>make</code>
* <code>make test</code>
* <code>sudo make install</code>
* <code>sudo ldconfig</code>
 
== Common cmake flags ==
 
* <code>-DENABLE_GR_XXX=ON</code> 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.
* <code>-DCMAKE_INSTALL_PREFIX=XXX</code> Install your stuff to XXX.
* <code>-DCMAKE_BUILD_TYPE=Debug</code> This causes gcc to add debug symbols to all binaries. Useful for debugging (otherwise, it decreases efficiency!)
* <code>-DPYTHON_EXECUTABLE=/usr/bin/python{2,3}</code> 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.
<p>For a list of additional cmake flags, as well as minimum versions of dependencies, see [https://www.gnuradio.org/doc/doxygen/build_guide.html]</p>
 
= Using PyBOMBS =
 
PyBOMBS is good at building UHD and GNU Radio from source, and installing into a specific isolated directory.  It creates the proper directory structure and setup_env.sh file for you.  To install the latest stable version of GNU Radio and UHD, run the following:
 
sudo apt-get install python-pip
sudo pip install pybombs
pybombs auto-config
pybombs recipes add-defaults
pybombs prefix init ~/gnuradio -R gnuradio-default
(wait a while)
. ~/gnuradio/setup_env.sh
gnuradio-companion
 
This will clone and install uhd and gnuradio (i.e., recipe "gnuradio-default") into a directory called "gnuradio" in your home directory (you can use a different name, like "prefix" or "target").
 
= Bootable DVD with GNU Radio Pre-installed =
 
One can download a fully pre-configured [[GNURadioLiveDVD]] that allows trying out GNU Radio without installing GNU Radio onto a PC. To make a permanent installation of GNU Radio, one will still needs to choose from the options described above.


= 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]].


If the installation worked without any trouble, you're ready to use GNU Radio! If you have no idea how to do that, read the [[HowToUse|page on how to use GNU Radio]]. You probably want to connect some [[Hardware]] to your computer to try and receive or transmit stuff. If you or your group would like to get a professional jump start on using GNU Radio and the USRP, [http://corganlabs.com Corgan Labs] offers a 3-day, hands-on training class that can be held at your own location.
Optionally, you may run <code>volk_profile</code> on your terminal to help libvolk to determine the optimal kernels (may speed up GNU Radio).  


[[Category:Installation]]
[[Category:Installation]]
[[Category:Guide]]
[[Category:Guide]]

Latest revision as of 21:34, 26 January 2024

Beginner Tutorials

Introducing GNU Radio

  1. What is GNU Radio?
  2. Installing GNU Radio
  3. Your First Flowgraph

Flowgraph Fundamentals

  1. Python Variables in GRC
  2. Variables in Flowgraphs
  3. Runtime Updating Variables
  4. Signal Data Types
  5. Converting Data Types
  6. Packing Bits
  7. Streams and Vectors
  8. Hier Blocks and Parameters

Creating and Modifying Python Blocks

  1. Creating Your First Block
  2. Python Block With Vectors
  3. Python Block Message Passing
  4. Python Block Tags

DSP Blocks

  1. Low Pass Filter Example
  2. Designing Filter Taps
  3. Sample Rate Change

Quick Start

Platform Method GNU Radio version
Debian.png Debian ≥12
Ubuntu.png Ubuntu ≥22.04
LinuxMint.png Linux Mint ≥21.1
RaspberryPi.pngRaspberry Pi OS64-bit ≥2021-10-30
sudo apt-get install gnuradio
Ubuntu 22.04:
v3.10.1.1
Debian 12:
v3.10.5.1
Ubuntu 23.10:
v3.10.7.0
Fedora.png Fedora ≥38
sudo dnf install gnuradio
Fedora 38:
v3.10.4.0
Fedora 39:
v3.10.6.0
Fedora 40:
v3.10.6.0
Ubuntu.png Ubuntu 20.04
Consider upgrading your Ubuntu

Ubuntu.png Ubuntu 22.04
sudo add-apt-repository ppa:gnuradio/gnuradio-releases
sudo apt-get update
sudo apt-get install gnuradio python3-packaging
v3.10.7.0
Tux.png Other Linux Distros
sudo {apt,dnf,yay,emerge,…} install gnuradio
See this table
Windows.png Windows

Run Windows Radioconda installer
and launch "GNU Radio Companion" from the Start menu

v3.10.9.2
MacOS.png macOS Intel: Run macOS Radioconda installer (x86_64)
Apple Silicon: Run macOS Radioconda installer (aarch64)

Other Installation Methods

Platform-specific guides

Cross-platform guides

  • Conda install guide
  • PyBOMBS - Note: We are no longer including PyBOMBS as a recommended method of installing GNU Radio, unless you want to play around with old versions (e.g. GR 3.7, 3.8, and OOTs of matching version)

VMs and Live Images

Over the years a number of Live Images and VMs have been created. There are currently no official versions but here are some current options:

  • Instant GNU Radio A customizable, programmatically generated VM and live environment for GNU Radio.
  • UbuntuVM An Ubuntu 20.04 virtual machine image with GNU Radio 3.8.2.0, Fosphor, GQRX, and several other useful pieces of software. (Created using Instant GNU Radio)

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 volk_profile on your terminal to help libvolk to determine the optimal kernels (may speed up GNU Radio).