Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/300.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/visual-studio-2010/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 蟒蛇蝗虫';蝗虫';未被识别为内部或外部命令、可操作程序或批处理文件_Python_Python 3.x_Command Line Interface_Command Prompt_Locust - Fatal编程技术网

Python 蟒蛇蝗虫';蝗虫';未被识别为内部或外部命令、可操作程序或批处理文件

Python 蟒蛇蝗虫';蝗虫';未被识别为内部或外部命令、可操作程序或批处理文件,python,python-3.x,command-line-interface,command-prompt,locust,Python,Python 3.x,Command Line Interface,Command Prompt,Locust,我使用的是使用python的蝗虫包。我将学习本教程: 但当我开始在命令行中执行这段代码时 locust locustfile.py 我得到这个错误 'locust' is not recognized as an internal or external command, operable program or batch file. 我已经成功地使用pip安装了蝗虫 任何帮助都可以!(很抱歉英语不好,这不是我的第一语言)如果您使用的是python3,您可能需要使用pip3安装蝗虫来安装蝗

我使用的是使用python的蝗虫包。我将学习本教程:

但当我开始在命令行中执行这段代码时

locust locustfile.py
我得到这个错误

'locust' is not recognized as an internal or external command,
operable program or batch file.
我已经成功地使用pip安装了蝗虫


任何帮助都可以!(很抱歉英语不好,这不是我的第一语言)

如果您使用的是python3,您可能需要使用
pip3安装蝗虫来安装蝗虫

这可能是设置Python37/Scripts位置的环境变量-Path的问题

您可以参考此链接了解类似问题:


@user10788336的回复应该会有所帮助。您还应该考虑创建一个python虚拟环境来隔离您的开发: