linux安装locust及遇到的坑

安装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了

原文地址:https://www.cnblogs.com/lynnetest/p/11558507.html