I know it is a wide answered question, however, I could solve it. When I'm trying to execute the command
usrp = uhd.usrp.MultiUSRP()
from https://pysdr.org/content/usrp.html I get this error
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: module 'uhd' has no attribute 'usrp'
I've executed:
export PYTHONPATH="/usr/local/lib/python3.8/site-packages/"
Inside lib I have:
/use/local/lib/python3.8/site-packages$ ls
uhd usrp_mpm
Inside uhd there are the following files (including usrp):
/usr/local/lib/python3.8/site-packages/uhd$ ls
chdr.py imgbuilder property_tree.py usrp
dsp __init__.py rfnoc.py usrpctl
filters.py libpyuhd.cpython-38-x86_64-linux-gnu.so types.py utils
And inside usrp:
/usr/local/lib/python3.8/site-packages/uhd/usrp$ ls
cal __init__.py libtypes.py multi_usrp.py
The version of python is:
Python 3.8.10 (default, Jun 22 2022, 20:18:18)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
The SO is:
Distributor ID: Ubuntu
Description: Ubuntu 20.04.5 LTS
Release: 20.04
Codename: focal
Anything missing?
I met the same problem as you, but now what I have found is the Python path issue.
Open bashrc file in the terminal :
At the end of the file, add up the UHD path:
Save and close bashrc file, back to the terminal:
Then restart your host and test: