擅长:python、mysql、java
<p>确保脚本安装在<code>PATH</code>环境变量中可用的目录中。在</p>
<p>使用<code>pip show file locustio</code>找出脚本的安装位置(在您的例子中:<code>~/.local/bin</code>)。修改您的<code>PATH</code>以包含脚本的安装目录。在您的情况下,您可能应该在<code>~/.zshrc</code>文件中添加如下内容:</p>
<pre><code>if [ -d "~/.local/bin" ] ; then
export PATH="~/.local/bin:$PATH"
fi
</code></pre>
<p>那么<code>locust</code>命令应该可以在所有新的shell会话中使用。在</p>