This error message typically means that pytest is not installed or not on the system PATH. To fix this issue, you can try the following:

  1. Install pytest using pip:
pip install pytest
  1. Add the directory containing pytest to your system PATH. On Windows, you can do this by following these steps:

    • Open the Start menu and search for "Environment Variables".
    • Click on "Edit the system environment variables".
    • Click on the "Environment Variables" button.
    • Under "System Variables", find the "Path" variable and click "Edit".
    • Click "New" and add the directory containing pytest (e.g. "C:\Python\Scripts").
    • Click "OK" to close all the windows.
  2. Restart your command prompt or terminal and try running pytest again.

If none of these solutions work, you may need to reinstall pytest or check that it was installed correctly

pytest is not recognized as an internal or external commandoperable program or batch file

原文地址: https://www.cveoy.top/t/topic/fqVN 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录