gr-dvbgse
gr-dvbgse copied to clipboard
import dvbgse error
Hy, when i try to test the new blocks from dvb-gse i get : ModuleNotFoundError: No module named 'dvbgse' any advices? i have installed all things as you wrote. Regards
You have to install into the same directory you've installed GNU Radio. You can find that with gnuradio-config-info --prefix
.
For example, if you installed with apt, then the prefix will be /usr
. To install gr-dvbgse (or any other OOT), you would use cmake -DCMAKE_INSTALL_PREFIX=/usr ../
when you build.
If you installed from a GNU Radio PPA, then gnuradio-config-info --prefix
may return /
. That's a bug. The correct prefix is /usr
.
Hello Ron, seems there is a path problem, the install put dvbgse and dvbs2rx in /usr/local/lib/python3/dist-packages/, but pythonpath does not contain this path, it contains /usr/local/lib/python3.8/dist-packages/, so i moved the two packages in this latter directory, and i don't get import not found any more.
But when i launch your graph (either dvbgse or dvbsrx) i get an error :
import dvbgse
File "/usr/local/lib/python3.8/dist-packages/dvbgse/init.py", line 18, in
same for dvbsrx :
import dvbs2rx
File "/usr/local/lib/python3.8/dist-packages/dvbs2rx/init.py", line 22, in
i tried to update pybind11-dev (as i have read on a forum) and rebuild but no success....
Thanks for help
Make sure your GNU Radio install is in /usr/local as I outlined above.
I believe it would have been better to just add to your PYTHONPATH
.
export PYTHONPATH=$PYTHONPATH:/usr/local/lib/python3/dist-packages
The Python path thing is pretty messy. There's a patch pending to straighten it out, but I'm not sure that everyone agrees on it yet.
https://github.com/gnuradio/gnuradio/pull/5148
OK, so to get clear i removed gnuradio with sudo apt-get remove --auto-remove gnuradio then i reinstalled gnu-radio with : sudo apt-get update sudo apt-get install gnuradio then i rebuild with cmake -DCMAKE_INSTALL_PREFIX=/usr ../ all seems installed in /usr/lib/python3/dist-packages when i launch your graph, the module is found but still errors :
import dvbs2rx File "/usr/local/lib/python3.8/dist-packages/dvbs2rx/init.py", line 22, in from .dvbs2rx_python import * ImportError: generic_type: type "bbdeheader_bb" referenced unknown base type "gr::block"
idem for dvbgse module
really difficult.... Thanks for help Yves Ps: my versions: fresh installation Ubuntu 20.04.3 LTS fresh installation (via apt install) gnuradio v3.10-compat-xxx-xunknown (Python 3.8.10)
You have to delete what's in /usr/local/lib/python3.8/dist-packages/
.
You may want to clean out all GNU Radio related files in /usr/local
for good measure.
Ok on, sorry to bother you, i have deleted the content of all dir in /user/local/lib i have the same errors Pybind11 problem ? Compilation problem ? i am so eager to test your software !! Thanks for help Yves
What is the exact error you're getting now? If you deleted /usr/local/lib/python3.8/dist-packages/*
, it can't be exactly the same.
Ok Ron : here is what i get in the gnu console when i start the graph :
Generating: '/home/yves/gr-dvbs2rx/apps/dvbs2_rx.py'
Executing: /usr/bin/python3 -u /home/yves/gr-dvbs2rx/apps/dvbs2_rx.py
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/dvbs2rx/init.py", line 18, in
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/yves/gr-dvbs2rx/apps/dvbs2_rx.py", line 40, in
Done (return code 1)
Looks to be a pybind11 issue. See https://www.mail-archive.com/[email protected]/msg73247.html
i have seen that post before, i have already done the apt update pybind-dev, and i have now the v2.4.3 on my system :
Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances
Lecture des informations d'état... Fait
pybind11-dev est déjà la version la plus récente (2.4.3-2build2).
Calcul de la mise à jour... Fait
0 mis à jour, 0 nouvellement installés, 0 à enlever et 0 non mis à jour.
I did the build of your modules with that version. Is it the right one ?
Regards Yves
I think you really need pybind11 v2.5.0. I don't see how apt upgrade pybind11-dev
could work as suggested in the e-mail. When I do that, it just says pybind11-dev is already the newest version (2.4.3-2build2).
.
It seems you'll have to build pybind11 from source.
sudo apt-get purge pybind11-dev
git clone https://github.com/pybind/pybind11.git
cd pybind11
git checkout v2.5.0 -b tmp
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DPYBIND11_TEST=OFF ../
make
sudo make install
sudo ldconfig
Ok thanks Ron, I will try that. So after I have to rebuild your modules ? Should I delete the old ones or something else ?
You should clean the build directory of the projects before rebuilding them. For example:
cd gr-dvbgse/build
rm -rf *
Make sure you're in the correct directory before issuing rm -rf *
!
You shouldn't have to worry about anything in /usr/lib. The new build will update those files.
Done, much better now :-) no more import errors ! now i need to understand how it works....Perhaps some further questions ! Thanks a lot Ron. Best regards Yves