Hello,
I am trying to use Pyadi-iio package on the Ubuntu. I follow the instruction of this page: https://wiki.analog.com/resources/tools-software/linux-software/pyadi-iio.
1. build libiio from source
2. my python is 3.8
3. run "pip install pylibiio" and "pip install pyadi-iio"
After that, when I run: python3 -c "import iio; print(iio.__file__); print(iio.version)", the result is:
pci@pci-virtual-machine:~$ python3 -c "import iio; print(iio.__file__); print(iio.version)" Using Libiio v0.x -> v1.x compatibility layer Traceback (most recent call last): File "<string>", line 1, in <module> File "/home/pci/.local/lib/python3.8/site-packages/iio.py", line 540, in <module> _c_read = _lib.iio_channel_read File "/usr/lib/python3.8/ctypes/__init__.py", line 386, in __getattr__ func = self.__getitem__(name) File "/usr/lib/python3.8/ctypes/__init__.py", line 391, in __getitem__ func = self._FuncPtr((name_or_ordinal, self)) AttributeError: /lib/x86_64-linux-gnu/libiio.so.0: undefined symbol: iio_channel_read
when I run: python3 -c "import adi; print(adi.__file__); print(adi.version)", the result is:
pci@pci-virtual-machine:~$ python3 -c "import adi; print(adi.__file__); print(adi.version)"Using Libiio v0.x -> v1.x compatibility layer Traceback (most recent call last): File "<string>", line 1, in <module> File "/home/pci/.local/lib/python3.8/site-packages/adi/__init__.py", line 5, in <module> from adi.ad469x import ad469x File "/home/pci/.local/lib/python3.8/site-packages/adi/ad469x.py", line 10, in <module> from adi.context_manager import context_manager File "/home/pci/.local/lib/python3.8/site-packages/adi/context_manager.py", line 5, in <module> import iio File "/home/pci/.local/lib/python3.8/site-packages/iio.py", line 540, in <module> _c_read = _lib.iio_channel_read File "/usr/lib/python3.8/ctypes/__init__.py", line 386, in __getattr__ func = self.__getitem__(name) File "/usr/lib/python3.8/ctypes/__init__.py", line 391, in __getitem__ func = self._FuncPtr((name_or_ordinal, self)) AttributeError: /lib/x86_64-linux-gnu/libiio.so.0: undefined symbol: iio_channel_read
Could you give me some advice? Thanks!
Best,
Dongyu