Sam Hooke

Calling iPerf3 from Python

Creating the Client with iperf3-python §

If when calling this:

>>> import iperf3
>>> client = iperf3.Client()

You get this error:

Exception AttributeError: "'Client' object has no attribute '_stdout_fd'" in <bound method Client.__del__ of <iperf3.iperf3.Client object at 0x2505f90>> ignored
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/myapp/virtualenv/lib/python2.7/site-packages/iperf3/", line 414, in __init__
    super(Client, self).__init__(role='c', *args, **kwargs)
  File "/opt/myapp/virtualenv/lib/python2.7/site-packages/iperf3/", line 110, in __init__
OSError: Couldn't find shared library, is iperf3 installed?

Try explicitly setting lib_name to the location of your For example:

>>> import iperf3
>>> client = iperf3.Client(lib_name='/usr/local/lib/')

See all notes.

← Previous Note: The Important Files: Part 1
Next Note: The Important Files: Part 2 →