[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
pybombs confusions
From: |
Lukas Haase |
Subject: |
pybombs confusions |
Date: |
Tue, 19 May 2020 20:15:23 +0200 |
Hi,
On an Ubuntu 18 system I would like to use multiple gnuradio+uhd instances in
parallel (3.7 with python 2.7, 3.8 with python 3, and a variety of versions
with patches applied, different UHD versions, RFnoc etc).
So far, I have multiple source trees and when I switch I completely delete
/usr/local and do "sudo make install && sudo ldconfig" in the respective build
directory. Clearly a bad solution. As far as I understand, pybombs should be a
solution to that. But its usage is pretty confusing to me (difference between
user wide config and a single prefix). Despite reading the the docs and playing
around for many hours, I have not been able to successfully use 3.7 and 3.8 in
parallel.
My main issue is: https://github.com/gnuradio/pybombs just explains how to get
a single prefix running at once (pybombs prefix init ~/{base_folder} -R
{your_recipe}). However, I need to do this step by step (since each prefix has
different modules, source code patches etc).
For the beginning, suppose I'd just want to have the "maint" branch of each
version (in following steps, I'd like to just copy prefix and make individual
changes)
$ sudo mv /usr/local /usr/local_OLD # just to make sure nothing interferes with
systemwide stuff
$ sudo pip3 install --upgrade git+https://github.com/gnuradio/pybombs.git
$ pybombs prefix init ~/gr37 -R gnuradio-stable
$ pybombs prefix init ~/gr38 -R gnuradio-default
$ cd ~/gr37
$ pybombs -p . config --env python_ver 2.7
1.) Why do I explicitely need to add "-p" above? According to the manual, the
prefix in the current directory should be taken when not supplied with "-p".
But without "-p", it gets written into ~/.pybombs/config.yml
2.) Why is "Prefix python version" still set to 3.6.9? Why is PYTHONPATH wrong
(*/python3.6/*)?
$ cd ~/gr37
$ pybombs prefix env | grep -i python
[INFO] Prefix Python version is: 3.6.9
[INFO] PyBOMBS Version 2.3.4a0
PYTHONPATH=/home/l/gr37/lib/python3.6/site-packages:/home/l/gr37/lib/python3.6/dist-packages:/home/l/gr37/lib64/python3.6/site-packages:/home/l/gr37/lib64/python3.6/dist-packages:$PYTHONPATH
PYTHON_VER=2.7
3.) Now running gr 3.7 in that prefix does not work:
$ cd ~/gr37
$ pybombs run gnuradio-companion
[INFO] Prefix Python version is: 3.6.9
[INFO] PyBOMBS Version 2.3.4a0
and the error message
"Cannot import gnuradio.
Is the model path environment variable set correctly?
All OS: PYTHONPATH
Is the library path environment variable set correctly?
Linux: LD_LIBRARY_PATH
Windows: PATH
MacOSX: DYLD_LIBRARY_PATH
(No module named gnuradio)"
4.) Also gr 3.8 does not work:
$ cd ~/gr38
pybombs run -- gnuradio-companion
[INFO] Prefix Python version is: 3.6.9
[INFO] PyBOMBS Version 2.3.4a0
and then I get the same error message as above ("Cannot import gnuradio")
5.) I think setup-env.sh is wrong. Which command generates this and how can
this file be regenetated with correct settings for each prefix (like python
version and library paths)?
6.) How do I modify each prefix?
For example, how to I switch the source to a specific branch or tag in uhd
or gnuradio?
How do I add my custom OOT module?
7.) How do I update a prefix?
For example, if I want to modify gnuradio or uhd source, where do I edit
the files (I assume $prefix/src ?) and how do I recompile/reinstall?
8.) When playing around I found that the following two commands sometimes have
different behavior (according to the manual, they should be identical but the
first one does not work):
$ cd ~/gr37
$ pybombs run gnuradio-compantion
vs
$ cd ~/gr37
$ source setup-end.sh
$ gnuradio-companion
Are they supposed to be identical? If yes, why could they give different
results? If not, what is the difference?
9.) How do I list installed packages in a prefix? (I think I can remove them
with "pybombs remove package", rebuild with "pybombs rebuild package" ?)
Sorry this is really confusing to me so I hope you could shed some light how
this is supposed to be used.
Thanks!
Lukas
- pybombs confusions,
Lukas Haase <=