On 25/11/2024 09:12, Hamdüsena BİLGİ (BİLGEM) via USRP-users wrote:
Hello dear usrp users,
I want to write code using the UHD Python APIs, but I get an error
when I try to run import uhd. UHD works properly in GNU Radio, but
when I try to work with Python 3.8 from the terminal or in VSCode, I
encounter the following error. How can I resolve this issue?
*export PYTHONPATH=/usr/local/lib/python3/dist-packages/:$PYTHONPATH*
python3.8
Python 3.8.10
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import uhd
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'uhd'
The versions on the device are:
gnuradio-config-info --v
v3.8.5.0-6-g57bd109d
-----------------------------------
uhd_config_info --version
UHD 4.7.0.0-0-ga5ed1872
------------------------------------------
uhd_find_devices
[INFO] [UHD] linux; GNU C++ version 9.4.0; Boost_107100;
UHD_4.7.0.0-0-ga5ed1872
--------------------------------------------------
-- UHD Device 0
--------------------------------------------------
Device Address:
serial: 33CB10C
addr:192.168.10.2 <callto:192.168.10.2>
claimed: False
fpga: 1G
mgmt_addr:192.168.10.2 <callto:192.168.10.2>
name: ni-e320-33CB10C
product: e320
type: e3xx
----------------------------------------
python3 --version
Python 3.8.10
----------------------------------------
g++ --version
g++ (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0 <callto:20.04.2) 9.4.0>
How did you install UHD? The Python API for UHD is different from the
interface that Gnu Radio uses for UHD -- they're
different things.
When you build UHD, you have to configure it to build the direct Python
support for UHD. It's likely that didn't
happen when it was built.
_______________________________________________
USRP-users mailing list -- usrp-users@lists.ettus.com
To unsubscribe send an email to usrp-users-le...@lists.ettus.com