On 26/11/2024 00:53, Hamdüsena BİLGİ (BİLGEM) wrote:
I installed dependecies
sudo apt install git cmake g++ libboost-all-dev libgmp-dev swig
python3-numpy python3-mako python3-sphinx python3-lxml doxygen
libfftw3-dev libsdl1.2-dev libgsl-dev libqwt-qt5-dev libqt5opengl5-dev
python3-pyqt5 liblog4cpp5-dev libzmq3-dev python3-yaml python3-click
python3-click-plugins python3-zmq python3-scipy python3-gi
python3-gi-cairo gobject-introspection gir1.2-gtk-3.0 build-essential
libusb-1.0-0-dev python3-docutils python3-setuptools
python3-ruamel.yaml python-is-python3
and /created//directory, cloned the USRP Hardware Driver (UHD 4.0
branch) from Ettus Research GitHub repository./
*git clone*--*branch UHD-4.7 https://github.com/ettusresearch/uhd.git uhd*
//
cd /uhd/host/
mkdir build
cd build
cmake ..
make
make test
sudo make install
sudo ldconfig
You need to explicitly enable the Python API in the build, see:
https://files.ettus.com/manual/page_python.html
------------------------------------------------------------------------
*Kimden: *"Marcus D. Leech" <[email protected]>
*Kime: *"usrp-users" <[email protected]>
*Gönderilenler: *25 Kasım Pazartesi 2024 18:04:27
*Konu: *[USRP-users] Re: Module Not Found Error
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
claimed: False
fpga: 1G
mgmt_addr: 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
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 -- [email protected]
To unsubscribe send an email to [email protected]
_______________________________________________
USRP-users mailing list -- [email protected]
To unsubscribe send an email to [email protected]