Skip to content

Instantly share code, notes, and snippets.

Ryan Tse rytse

Block or report user

Report or block rytse

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@rytse
rytse / gr_py3_guide.md
Created Apr 28, 2019
GNURadio with Anaconda Python 3 Installation Guide
View gr_py3_guide.md

GNURadio with Anaconda Python 3 Installation Guide

At its current state, GNURadio 3.7 does not work out-of-the-box with Python 3. This is a guide to building GNURadio from source to use a Python 3 Anaconda environment. This setup is particularly nice since you can still easily import other Python packages with conda and use them inside GNURadio blocks.

This guide assumes you have installed all the system dependencies of GNURadio (not including the Python ones) and Anaconda 3. You can find the list of system dependencies on the GNURadio website. You need all the ones that aren't called gnuradio or python-*.

Pulling the Source

Pull the GNURadio source and the environment.yml file that describes the conda environment that plays nice with GNURadio. At the time that this tutorial was written, this worked for [ 72aa97d](https://github.com/gnuradio/gnuradio/commit/72aa97daab609f907ba10

@rytse
rytse / gr_py3_env.yml
Last active Jul 15, 2019
Python 3.7 conda env that gnuradio will install with (see full install guide here: https://gist.github.com/rytse/9f5c38caa9ce13e8063298be284c8897)
View gr_py3_env.yml
name: dsp
channels:
- conda-forge
- ostrokach
- anaconda
- defaults
dependencies:
- alabaster=0.7.12=py37_0
- asn1crypto=0.24.0=py37_0
- at-spi2-atk=2.16.0=1
View apt packages.txt
rytse@SEDRSSHYPRES:~/usrlibs/gr-oots/gr-osmosdr/build$ apt list --installed
Listing... Done
a11y-profile-manager-indicator/xenial,now 0.1.10-0ubuntu3 amd64 [installed]
account-plugin-facebook/xenial,xenial,now 0.12+16.04.20160126-0ubuntu1 all [installed]
account-plugin-flickr/xenial,xenial,now 0.12+16.04.20160126-0ubuntu1 all [installed]
account-plugin-google/xenial,xenial,now 0.12+16.04.20160126-0ubuntu1 all [installed]
accountsservice/xenial-updates,now 0.6.40-2ubuntu11.3 amd64 [installed]
acl/xenial,now 2.2.52-3 amd64 [installed]
acpi-support/xenial,now 0.142 amd64 [installed]
acpid/xenial,now 1:2.0.26-1ubuntu2 amd64 [installed]
View pybombs_fail_4.txt
rytse@rytse-VirtualBox:~$ sudo apt install libgtk-3-dev libgtk-3-0
[sudo] password for rytse:
Reading package lists... Done
Building dependency tree
Reading state information... Done
libgtk-3-0 is already the newest version (3.18.9-1ubuntu3.3).
The following package was automatically installed and is no longer required:
libllvm5.0
Use 'sudo apt autoremove' to remove it.
The following additional packages will be installed:
View gr-osmosdr make output.txt
rytse@SEDRSSHYPRES:~/usrlibs/gr-oots/gr-osmosdr/build$ make -j12
Scanning dependencies of target osmosdr_grc_xml_blocks
Scanning dependencies of target pygen_python_c8b22
Scanning dependencies of target osmosdr_swig_swig_doc
Scanning dependencies of target pygen_apps_02681
Scanning dependencies of target pygen_apps_60e61
Scanning dependencies of target gnuradio-osmosdr
[ 4%] Shebangin osmocom_siggen_nogui
[ 4%] Shebangin osmocom_siggen
[ 6%] Generating osmosdr_sink.xml
View pybombs_fail_3.txt
rytse@rytse-VirtualBox:~$ sudo apt install libgtk2.0-dev libgtk2.0-0
[sudo] password for rytse:
Reading package lists... Done
Building dependency tree
Reading state information... Done
libgtk2.0-0 is already the newest version (2.24.30-1ubuntu1.16.04.2).
The following package was automatically installed and is no longer required:
libllvm5.0
Use 'sudo apt autoremove' to remove it.
The following additional packages will be installed:
View clean_pybombs_output.txt
rytse@rytse-VirtualBox:~$ virtualenv venv
Running virtualenv with interpreter /usr/bin/python2
New python executable in /home/rytse/venv/bin/python2
Also creating executable in /home/rytse/venv/bin/python
Installing setuptools, pkg_resources, pip, wheel...^[[Ddone.
rytse@rytse-VirtualBox:~$ source venv/bin/activate
(venv) rytse@rytse-VirtualBox:~$ pip install pybombs
Collecting pybombs
Downloading https://files.pythonhosted.org/packages/f1/40/b820ecd701ffe7a222815769b372c4626f1122d70f0bdd3fb28976e8c7f6/PyBOMBS-2.3.2.tar.gz (75kB)
100% |████████████████████████████████| 81kB 3.8MB/s
View pybombs_fail_output_2.txt
(env) rytse@SEDRSSHYPRES:~$ pip install numpy mako lxml cheetah
Collecting numpy
Using cached https://files.pythonhosted.org/packages/85/51/ba4564ded90e093dbb6adfc3e21f99ae953d9ad56477e1b0d4a93bacf7d3/numpy-1.15.0-cp27-cp27mu-manylinux1_x86_64.whl
Collecting mako
Collecting lxml
Using cached https://files.pythonhosted.org/packages/39/e0/bb4bb8d03a98ba530a13e5d27c7ae5eb9b2b53ce36c4e854429fcf2b90be/lxml-4.2.4-cp27-cp27mu-manylinux1_x86_64.whl
Collecting cheetah
Collecting MarkupSafe>=0.9.2 (from mako)
Collecting Markdown>=2.0.1 (from cheetah)
Using cached https://files.pythonhosted.org/packages/6d/7d/488b90f470b96531a3f5788cf12a93332f543dbab13c423a5e7ce96a0493/Markdown-2.6.11-py2.py3-none-any.whl
View pybombs_fail_output.txt
(env) rytse@SEDRSSHYPRES:~$ !pybombs
pybombs prefix init ~/prefix -a myprefix -R gnuradio-default
PyBOMBS - INFO - PyBOMBS Version 2.3.2
PyBOMBS.prefix - WARNING - There already is a prefix in `/home/rytse/prefix'.
Continue using this path Y/[N]? y
Alias `myprefix' already exists, overwrite Y/[N]? y
PyBOMBS.prefix - INFO - Installing default packages for prefix...
PyBOMBS.prefix - INFO -
- gnuradio
PyBOMBS.Packager.apt - INFO - Install python-apt to speed up apt processing.
View .tmux.conf
######################
### DESIGN CHANGES ###
######################
set -g default-terminal "screen-256color"
# loud or quiet?
set-option -g visual-activity off
set-option -g visual-bell off
set-option -g visual-silence off
You can’t perform that action at this time.