2024-09-29 23:30:33 发布
网友
我在从GitBash执行pytest时遇到问题。 在GitBash中,im位于pytest和.py文件的目录中。在GitBash中编写pytest会给我bash: pytest: command not found。我知道我可以从PyChamr的终端执行pytest,但是使用Bash执行的pytest并不舒服。 我在互联网上查找发现,pytest安装在venv中,这可能会导致一些问题
pytest
bash: pytest: command not found
您需要将pytest所在的目录添加到PATH环境变量中,或者需要在命令中指定完整路径。对于GitBash,您可以通过编辑主目录中的.bashrc文件来实现这一点
PATH
.bashrc
您需要将
pytest
所在的目录添加到PATH
环境变量中,或者需要在命令中指定完整路径。对于GitBash,您可以通过编辑主目录中的.bashrc
文件来实现这一点相关问题 更多 >
编程相关推荐