這很煩人,所以我花了 15 個小時試圖找出為什么 locust.io 不會為我啟動。在我的 mac 機器上,我試圖獲得一個運行 locust 的示例,以便我可以開始對該包的探索。我使用 pip 在虛擬環境(python v3.7.7)中安裝了 locust:pip install locust所有軟件包均已成功安裝。這是示例代碼:from locust import HttpLocust,TaskSetclass 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 PyObjectreturn 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 PyObjectreturn 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 PyObjectreturn 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 PyObjectreturn 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 PyObjectreturn 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 PyObjectreturn f(*args, **kwds)
- 2 回答
- 0 關注
- 282 瀏覽
添加回答
舉報
0/150
提交
取消