No bells and whistles, just install locally
1. Open the link of Tsinghua source pycocotools:
https://pypi.tuna.tsinghua.edu.cn/simple/pycocotools-windows/
2. Find the version of pycocotools corresponding to Python (Python3.8 selects the last cp38-win-amd64, similarly selects cp37_win_amd64 for py37)
3. After downloading the file
pycocotools_windows-2.0.0.2-cp38-cp38-win_amd64.whl
4. Run the following code: (Note that the files downloaded here are stored in your current code directory
pip install pycocotools_windows-2.0.0.2-cp38-cp38-win_amd64.whl
If the file is not saved in the current directory, you need to add the folder location of your file to run the code, as follows:
pip install F:\GoogleDownload\pycocotools_windows-2.0.0.2-cp36-cp36m-win_amd64.whl
5. After the installation is displayed successfully, execute
conda list
pycocotools-windows is in the list
——————————————————————————————————————
Additional problems with yolov3 and yolov5 environment configuration:
After following the above steps to follow pycocotools, execute pip install -r requirements.txt, and find that the error of
pycocotools is still reported . The conda list has shown that there are pycocotools in the environment, but you will still report an error that the pycocotools package cannot be installed when you pip install -r requirements.txt. This situation may be a bug, so don’t worry), you may need to install an opencv-python, and then The code of yolov3 or v5 can be run normally: (manually install opencv-python)
pip install opencv-python
Then execute the following code directly:
python detect.py