Hi,
When I try to import the adi
Python module I get the following error
>>> import adi
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3/dist-packages/adi/__init__.py", line 34, in <module>
from adi.ad936x import ad9361, ad9363, ad9364, Pluto
File "/usr/lib/python3/dist-packages/adi/ad936x.py", line 34, in <module>
from adi.context_manager import context_manager
File "/usr/lib/python3/dist-packages/adi/context_manager.py", line 37, in <module>
class context_manager(object):
File "/usr/lib/python3/dist-packages/adi/context_manager.py", line 42, in context_manager
def ctx(self) -> iio.Context:
AttributeError: module 'iio' has no attribute 'Context'
I would be grateful to be pointed in the right direction here. Some further information is given below
Output of iio_info is shown below
$ iio_info -s
Library version: 0.23 (git tag: v0.23)
Compiled with backends: local xml ip usb
Unable to create Local IIO context : No such file or directory (2)
Available contexts:
0: 0456:b673 (Analog Devices Inc. PlutoSDR (ADALM-PLUTO)), serial=104400b839910016fbff2300d79a65fe2e [usb:3.6.5]
1: 192.168.2.1 (Analog Devices PlutoSDR Rev.B (Z7010-AD9364)), serial=104400b839910016fbff2300d79a65fe2e [ip:pluto.local]
Also the PlutoSDR network interface has been detected as shown below
$ ip a
7: enx00e022d09a5c: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN group default qlen 1000
link/ether 00:e0:22:d0:9a:5c brd ff:ff:ff:ff:ff:ff
inet 192.168.2.10/24 brd 192.168.2.255 scope global dynamic noprefixroute enx00e022d09a5c
valid_lft 861784sec preferred_lft 861784sec
inet6 fe80::8efe:af5b:2260:286e/64 scope link noprefixroute
valid_lft forever preferred_lft forever
I am using Debian/Bullseye with following version of Python packages
pyadi-iio : Built from git (last commit on 2021-12-16)
python3-libiio : version 0.23 (backported from Debian/unstable)
regards