我已经在我的centos 7中安装了pytest。但是当我试图检查版本时,它给出了以下错误:
$ pip install pytest
Requirement already satisfied: pytest in /usr/lib/python2.7/site-packages
Requirement already satisfied: py>=1.4.25 in /usr/lib/python2.7/site-packages (from pytest)
$ pytest --version
-bash: pytest: command not found
我是Centos的新手。有人可以帮我弄清问题是什么。我用Google搜索,但没有得到任何明确的答案。
您应该能够运行命令'locate bin / pytest'以找到pytest脚本。
我的安装示例: 找到bin / pytest
返回: 在/ usr / bin中/ pytest