安裝locust很簡單,簡單的我以為pip install一下就好了,結果運行locust死活不行,后來的后來,,才搞清楚還要進行以下操作。
前提:
1.已安裝Python3和pip3(或者都是2,版本保證一致)
2.pip3下已安裝locustio,通過pip3 list查看是否已安裝
后續操作:
1.找到locust可執行文件路徑。pip show locustio展示的路徑為locust安裝路徑,可執行文件路徑在/usr/local/python3/bin
2.把locust可執行文件路徑添加到path環境變量里面。 運行:vim /etc/profile
3.使path馬上生效s。 運行:source /etc/profile
4.再運行locust -help就ojbk了