0

我使用pip安装了iperf3,它安装成功。但是在调用客户端函数时会引发错误。有人可以帮忙吗?

(base) C:\Users\alok.kumar>python
Python 3.8.8 (default, Apr 13 2021, 15:08:03) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import iperf3
>>> client = iperf3.Client()
Traceback (most recent call last):
  File "C:\Users\alok.kumar\Anaconda3\lib\site-packages\iperf3\iperf3.py", line 106, in __init__
    self.lib = cdll.LoadLibrary(lib_name)
  File "C:\Users\alok.kumar\Anaconda3\lib\ctypes\__init__.py", line 459, in LoadLibrary
    return self._dlltype(name)
  File "C:\Users\alok.kumar\Anaconda3\lib\ctypes\__init__.py", line 381, in __init__
    self._handle = _dlopen(self._name, mode)
FileNotFoundError: Could not find module 'libiperf.so.0' (or one of its dependencies). Try using the full path with constructor syntax.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\alok.kumar\Anaconda3\lib\site-packages\iperf3\iperf3.py", line 418, in __init__
    super(Client, self).__init__(role='c', *args, **kwargs)
  File "C:\Users\alok.kumar\Anaconda3\lib\site-packages\iperf3\iperf3.py", line 108, in __init__
    raise OSError(
OSError: Couldn't find shared library libiperf.so.0, is iperf3 installed?
4

0 回答 0