locust報錯:RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 72 from C header, got 76 from PyObject
阿新 • • 發佈:2020-12-29
locust -f xx.py報錯:
/usr/lib/python3.7/importlib/_bootstrap.py:219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 72 from C header, got 76 from PyObject return f(*args, **kwds) /usr/lib/python3.7/importlib/_bootstrap.py:219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 72 fromC header, got 76 from PyObject return f(*args, **kwds) /usr/lib/python3.7/importlib/_bootstrap.py:219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 72 from C header, got 76 from PyObject return f(*args, **kwds) /usr/lib/python3.7/importlib/_bootstrap.py:219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 72 fromC header, got 76 from PyObject return f(*args, **kwds) /usr/lib/python3.7/importlib/_bootstrap.py:219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 72 from C header, got 76 from PyObject return f(*args, **kwds) /usr/lib/python3.7/importlib/_bootstrap.py:219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 72 fromC header, got 76 from PyObject return f(*args, **kwds) /usr/lib/python3.7/importlib/_bootstrap.py:219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 72 from C header, got 76 from PyObject return f(*args, **kwds) /usr/lib/python3.7/importlib/_bootstrap.py:219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 72 from C header, got 76 from PyObject return f(*args, **kwds) /usr/lib/python3.7/importlib/_bootstrap.py:219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 72 from C header, got 76 from PyObject return f(*args, **kwds) /usr/lib/python3.7/importlib/_bootstrap.py:219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 72 from C header, got 76 from PyObject return f(*args, **kwds)
網上找答案是不相容導致,需更新庫:https://stackoverflow.com/questions/64105616/greenlet-runtime-error-and-deployed-app-in-docker-keeps-booting-all-the-workers
命令列執行pip3.exe list檢視當前第三方庫的版本
命令列執行pip3.exe install --upgrade gevent==20.9.0
然後問題解決,可以正常使用locust
附:
安裝指定版本:pip3.exe install locustio==0.16.4
解除安裝pip3.exe uninstall locustio