我正在学习Vagrant中的python-django教程(Ubuntu18.04/ Python3.6.6)。运行pip3 install pytest-django并配置pytest.ini文件后,运行pytest返回
Command 'pytest' not found, but can be installed with:
apt install python-pytest
Please ask your administrator.pip3 freeze输出:
pytest==3.10.0
pytest-django==3.4.3这个装置还有别的地方吗?
发布于 2018-11-05 13:19:44
试试python -m pytest
通过pip安装pytest并不使它成为一个系统命令,而是将其安装到python。-m命令将pytest作为自己的命令运行,然后任何正在进行的脚本都将是一个参数。
发布于 2022-04-04 13:35:48
当我想在.sh文件中运行以下代码时,遇到了问题。
pytest-3 -s test.py为了解决这个问题,我从linux本身获得了如下解决方案:
sudo apt install python3-pytesthttps://stackoverflow.com/questions/53154896
复制相似问题