Locust.io:运行时警告:greenlet.greenlet 大小已更改,可能表示二进制不兼容

这很烦人,所以我花了 15 个小时试图找出为什么 locust.io 不会为我启动。在我的 mac 机器上,我试图获得一个运行 locust 的示例,以便我可以开始对该包的探索。我使用 pip 在虚拟环境(python v3.7.7)中安装了 locust:pip install locust


所有软件包均已成功安装。


这是示例代码:


from locust import HttpLocust,TaskSet


class MyTasks(TaskSet):

def index(self):

self.client.get("https://refinery.nypl.org/api/nypl/ndo/v0.1/content/alerts?filter[scope]=all")


class WebsiteUser(HttpLocust):

task_set = MyTasks

我运行 locust -f mytestloc.py 后出现此错误:


/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/importlib/_bootstrap.py:219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 144 from C header, got 152 from PyObject


return f(*args, **kwds)


/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/importlib/_bootstrap.py:219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 144 from C header, got 152 from PyObject


return f(*args, **kwds)


/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/importlib/_bootstrap.py:219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 144 from C header, got 152 from PyObject


return f(*args, **kwds)


/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/importlib/_bootstrap.py:219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 144 from C header, got 152 from PyObject


return f(*args, **kwds)


/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/importlib/_bootstrap.py:219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 144 from C header, got 152 from PyObject


return f(*args, **kwds)


/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/importlib/_bootstrap.py:219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 144 from C header, got 152 from PyObject


return f(*args, **kwds)


GCT1015
浏览 191回答 2
2回答

BIG阳

Greenlet 运行时错误和在 docker 中部署的应用程序不断启动所有工作人员尝试pip install --upgrade gevent或pip install greenlet==0.14.6。

偶然的你

尝试pip install greenlet==0.4.16
打开App,查看更多内容
随时随地看视频慕课网APP