thiezn / iperf3-python

Python wrapper around iperf3
https://iperf3-python.readthedocs.org/
MIT License
109 stars 52 forks source link

python3.10 support? #71

Open gharris999 opened 1 year ago

gharris999 commented 1 year ago

python3.10 is the python version included with the Ubuntu 22.04 LTS release. I'm finding that the iperf3 python module fails with this version. Example output: File "/usr/local/share/lcwa-speed/lib/python3.10/site-packages/iperf3/iperf3.py", line 100, in __init__ lib_name = util.find_library('libiperf') File "/usr/lib/python3.10/ctypes/util.py", line 341, in find_library _get_soname(_findLib_gcc(name)) or _get_soname(_findLib_ld(name)) File "/usr/lib/python3.10/ctypes/util.py", line 147, in _findLib_gcc if not _is_elf(file): File "/usr/lib/python3.10/ctypes/util.py", line 99, in _is_elf with open(filename, 'br') as thefile: FileNotFoundError: [Errno 2] No such file or directory: b'liblibiperf.a' Exception ignored in: <function IPerf3.__del__ at 0x7f07db2cb0a0> Traceback (most recent call last): File "/usr/local/share/lcwa-speed/lib/python3.10/site-packages/iperf3/iperf3.py", line 213, in __del__ os.close(self._stdout_fd) AttributeError: 'Client' object has no attribute '_stdout_fd'

Is support for this version contemplated to be released any time soon?

gharris999 commented 1 year ago

Workaround:

cd /usr/local/lib

ln -s ./libiperf.a liblibiperf.a

diamant-x commented 4 months ago

Hi, I'm having issues with the library but on Python 3.12. Do anyone else having issues handling connection errors to servers in client mode? This library is 5 years old, and since its last release https://pypi.org/project/iperf3/#history, iperf3 binaries has had 10 major revisions https://software.es.net/iperf/, as well as several Python versions have been released since, which I'm not sure has been tested against and is still functional.

Thanks!

PS: Any in-place replacement for other python librearios for supported iperf3 versions?