pytest is not recognized as an internal or external commandoperable program or batch file
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:
- Install pytest using pip:
pip install pytest
-
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.
-
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
原文地址: https://www.cveoy.top/t/topic/fqVN 著作权归作者所有。请勿转载和采集!