1. Problem description:
When running the yolo v5-tain.py file, I encountered CalledProcessError: Command 'pip install 'pycocotools>=2.0''
Need to download pycocotools
——An error is reported when installing pycocotools on Win10 : (and the direct cmd input of pip install fails to install the file)
ModuleNotFoundError: No module named 'pycocotools
3. Tips: Powershell window: win+R key, enter powershell and press Enter; after entering, use cd to change to the specified file path.
4. Download the pycocotools installation package (pro-test is effective)
https://github.com/pdollar/coco.git
5. Delete the first two values of extra_compile_args in the setup.py file in the PythonAPI folder in the installation package.
Delete until only this one remains.
- Then open the command line window, cd to the location of PythonAPI in the decompressed package D:\iDeepLearning\Python_library\cocoapi-master\cocoapi-master\PythonAPI
- Execute the following command in the command line window (powershell)
python setup.py build_ext --inplace
python setup.py build_ext install
6. When the command is executed, an error is reported, prompting that Microsoft Visual C++ 14.0 is required
7. Install Microsoft Visual C++ 14.0 is required:
See in the comment area:; Baidu network disk, please enter the extraction code Extraction code: ka7q
**pip3 install pycocotools** error: Microsoft Visual C++ 14.0 is required.
Download the 1.8G installation file from the Baidu network disk in the link above, and follow the installation prompts to install successfully!
8. Repeat the small step 1.2 in step 5, and check all the packages in the environment after the command is executed.
(Since I am in a conda environment, the command I entered here is conda list to view all packages)
This item indicates that the installation is successful.
Thanks to the great gods who quoted the links above! The method mentioned above is the information found on the Internet, personally tested, and it is true and effective.
This article is for personal study records only.