pycocotools 安装疑难解答

问题描述

我正在尝试使用来自 Tensorflow 的对象检测模型,并且需要安装 pycocotools。我正在 Windows 10 机器上的 python (3) 虚拟环境中执行此操作。在 Windows 上使用它似乎存在一些已知问题,我很确定我已经尝试了所有这些问题。

我试过 pip 安装 pycocotools,但出现此错误(构建轮子失败):

(env) PS C:\Users\la01043601\ML_Cameravision\humanDetection> pip install pycocotools
Collecting pycocotools
  Using cached pycocotools-2.0.2.tar.gz (23 kB)
Requirement already satisfied: setuptools>=18.0 in c:\users\la01043601\ml_cameravision\humandetection\env\lib\site-packages (from pycocotools) (56.0.0)
Requirement already satisfied: cython>=0.27.3 in c:\users\la01043601\ml_cameravision\humandetection\env\lib\site-packages (from pycocotools) (0.29.23)
Requirement already satisfied: matplotlib>=2.1.0 in c:\users\la01043601\ml_cameravision\humandetection\env\lib\site-packages (from pycocotools) (3.4.2)
Requirement already satisfied: pyparsing>=2.2.1 in c:\users\la01043601\ml_cameravision\humandetection\env\lib\site-packages (from matplotlib>=2.1.0->pycocotools) (2.4.7)
Requirement already satisfied: cycler>=0.10 in c:\users\la01043601\ml_cameravision\humandetection\env\lib\site-packages (from matplotlib>=2.1.0->pycocotools) (0.10.0)
Requirement already satisfied: pillow>=6.2.0 in c:\users\la01043601\ml_cameravision\humandetection\env\lib\site-packages (from matplotlib>=2.1.0->pycocotools) (8.2.0)
Requirement already satisfied: numpy>=1.16 in c:\users\la01043601\ml_cameravision\humandetection\env\lib\site-packages (from matplotlib>=2.1.0->pycocotools) (1.19.5)
Requirement already satisfied: kiwisolver>=1.0.1 in c:\users\la01043601\ml_cameravision\humandetection\env\lib\site-packages (from matplotlib>=2.1.0->pycocotools) (1.3.1)
Requirement already satisfied: python-dateutil>=2.7 in c:\users\la01043601\ml_cameravision\humandetection\env\lib\site-packages (from matplotlib>=2.1.0->pycocotools) (2.8.1)
Requirement already satisfied: six in c:\users\la01043601\ml_cameravision\humandetection\env\lib\site-packages (from cycler>=0.10->matplotlib>=2.1.0->pycocotools) (1.15.0)
Building wheels for collected packages: pycocotools
  Building wheel for pycocotools (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: 'c:\users\la01043601\ml_cameravision\humandetection\env\scripts\python.exe' -u -c 'import io,os,sys,setuptools,tokenize; sys.argv[0] = '"'"'C:\\Users\\la01043601\\AppData\\Local\\Temp\\pip-install-hjka7e0k\\pycocotools_91d3c7ee2ad946f292455cc0fc685c5f\\setup.py'"'"'; __file__='"'"'C:\\Users\\la01043601\\AppData\\Local\\Temp\\pip-install-hjka7e0k\\pycocotools_91d3c7ee2ad946f292455cc0fc685c5f\\setup.py'"'"';f = getattr(tokenize,'"'"'open'"'"',open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"','"'"'\n'"'"');f.close();exec(compile(code,__file__,'"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\la01043601\AppData\Local\Temp\pip-wheel-i_wesduj'
       cwd: C:\Users\la01043601\AppData\Local\Temp\pip-install-hjka7e0k\pycocotools_91d3c7ee2ad946f292455cc0fc685c5f\
  Complete output (23 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build\lib.win-amd64-3.9
  creating build\lib.win-amd64-3.9\pycocotools
  copying pycocotools\coco.py -> build\lib.win-amd64-3.9\pycocotools
  copying pycocotools\cocoeval.py -> build\lib.win-amd64-3.9\pycocotools
  copying pycocotools\mask.py -> build\lib.win-amd64-3.9\pycocotools
  copying pycocotools\__init__.py -> build\lib.win-amd64-3.9\pycocotools
  running build_ext
  cythoning pycocotools/_mask.pyx to pycocotools\_mask.c
  c:\users\la01043601\ml_cameravision\humandetection\env\lib\site-packages\Cython\Compiler\Main.py:369: FutureWarning: Cython directive 'language_level' not set,using 2 for Now (Py2). This will change in a later release! File: C:\Users\la01043601\AppData\Local\Temp\pip-install-hjka7e0k\pycocotools_91d3c7ee2ad946f292455cc0fc685c5f\pycocotools\_mask.pyx
    tree = Parsing.p_module(s,pxd,full_module_name)
  building 'pycocotools._mask' extension
  creating build\temp.win-amd64-3.9
  creating build\temp.win-amd64-3.9\Release
  creating build\temp.win-amd64-3.9\Release\common
  creating build\temp.win-amd64-3.9\Release\pycocotools
  C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30037\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:\users\la01043601\ml_cameravision\humandetection\env\lib\site-packages\numpy\core\include -I./common -Ic:\users\la01043601\ml_cameravision\humandetection\env\include -IC:\python39\include -IC:\python39\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30037\ATLMFC\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30037\include /Tc./common/maskApi.c /Fobuild\temp.win-amd64-3.9\Release\./common/maskApi.obj
  maskApi.c
  ./common/maskApi.c(8): Fatal error C1083: Cannot open include file: 'math.h': No such file or directory
  error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.29.30037\\bin\\HostX86\\x64\\cl.exe' Failed with exit code 2
  ----------------------------------------
  ERROR: Failed building wheel for pycocotools
  Running setup.py clean for pycocotools
Failed to build pycocotools
Installing collected packages: pycocotools
    Running setup.py install for pycocotools ... error
    ERROR: Command errored out with exit status 1:
     command: 'c:\users\la01043601\ml_cameravision\humandetection\env\scripts\python.exe' -u -c 'import io,'"'"'exec'"'"'))' install --record 'C:\Users\la01043601\AppData\Local\Temp\pip-record-crzypf9k\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\la01043601\ml_cameravision\humandetection\env\include\site\python3.9\pycocotools'
         cwd: C:\Users\la01043601\AppData\Local\Temp\pip-install-hjka7e0k\pycocotools_91d3c7ee2ad946f292455cc0fc685c5f\
    Complete output (21 lines):
    running install
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-3.9
    creating build\lib.win-amd64-3.9\pycocotools
    copying pycocotools\coco.py -> build\lib.win-amd64-3.9\pycocotools
    copying pycocotools\cocoeval.py -> build\lib.win-amd64-3.9\pycocotools
    copying pycocotools\mask.py -> build\lib.win-amd64-3.9\pycocotools
    copying pycocotools\__init__.py -> build\lib.win-amd64-3.9\pycocotools
    running build_ext
    skipping 'pycocotools\_mask.c' Cython extension (up-to-date)
    building 'pycocotools._mask' extension
    creating build\temp.win-amd64-3.9
    creating build\temp.win-amd64-3.9\Release
    creating build\temp.win-amd64-3.9\Release\common
    creating build\temp.win-amd64-3.9\Release\pycocotools
    C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30037\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:\users\la01043601\ml_cameravision\humandetection\env\lib\site-packages\numpy\core\include -I./common -Ic:\users\la01043601\ml_cameravision\humandetection\env\include -IC:\python39\include -IC:\python39\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30037\ATLMFC\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30037\include /Tc./common/maskApi.c /Fobuild\temp.win-amd64-3.9\Release\./common/maskApi.obj
    maskApi.c
    ./common/maskApi.c(8): Fatal error C1083: Cannot open include file: 'math.h': No such file or directory
    error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.29.30037\\bin\\HostX86\\x64\\cl.exe' Failed with exit code 2
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\la01043601\ml_cameravision\humandetection\env\scripts\python.exe' -u -c 'import io,'"'"'exec'"'"'))' install --record 'C:\Users\la01043601\AppData\Local\Temp\pip-record-crzypf9k\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\la01043601\ml_cameravision\humandetection\env\include\site\python3.9\pycocotools' Check the logs for full command output.

我已经尝试过 Phil Ferriere 的存储库中的修复程序(仍然无法构建轮子,找不到 math.h 文件):

(env) PS C:\Users\la01043601\ML_Cameravision\humanDetection> pip install git+https://github.com/philferriere/cocoapi.git#subdirectory=PythonAPI
Collecting git+https://github.com/philferriere/cocoapi.git#subdirectory=PythonAPI
  cloning https://github.com/philferriere/cocoapi.git to c:\users\la01043601\appdata\local\temp\pip-req-build-htao1r08
  Running command git clone -q https://github.com/philferriere/cocoapi.git 'C:\Users\la01043601\AppData\Local\Temp\pip-req-build-htao1r08'
Building wheels for collected packages: pycocotools
  Building wheel for pycocotools (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: 'c:\users\la01043601\ml_cameravision\humandetection\env\scripts\python.exe' -u -c 'import io,tokenize; sys.argv[0] = '"'"'C:\\Users\\la01043601\\AppData\\Local\\Temp\\pip-req-build-htao1r08\\PythonAPI\\setup.py'"'"'; __file__='"'"'C:\\Users\\la01043601\\AppData\\Local\\Temp\\pip-req-build-htao1r08\\PythonAPI\\setup.py'"'"';f = getattr(tokenize,'"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\la01043601\AppData\Local\Temp\pip-wheel-kktx8s70'
       cwd: C:\Users\la01043601\AppData\Local\Temp\pip-req-build-htao1r08\PythonAPI
  Complete output (20 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build\lib.win-amd64-3.9
  creating build\lib.win-amd64-3.9\pycocotools
  copying pycocotools\coco.py -> build\lib.win-amd64-3.9\pycocotools
  copying pycocotools\cocoeval.py -> build\lib.win-amd64-3.9\pycocotools
  copying pycocotools\mask.py -> build\lib.win-amd64-3.9\pycocotools
  copying pycocotools\__init__.py -> build\lib.win-amd64-3.9\pycocotools
  running build_ext
  building 'pycocotools._mask' extension
  creating build\temp.win-amd64-3.9
  creating build\temp.win-amd64-3.9\common
  creating build\temp.win-amd64-3.9\Release
  creating build\temp.win-amd64-3.9\Release\pycocotools
  C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30037\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:\users\la01043601\ml_cameravision\humandetection\env\lib\site-packages\numpy\core\include -I../common -Ic:\users\la01043601\ml_cameravision\humandetection\env\include -IC:\python39\include -IC:\python39\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30037\ATLMFC\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30037\include /Tc../common/maskApi.c /Fobuild\temp.win-amd64-3.9\Release\../common/maskApi.obj
  maskApi.c
  ../common/maskApi.c(8): Fatal error C1083: Cannot open include file: 'math.h': No such file or directory
  error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.29.30037\\bin\\HostX86\\x64\\cl.exe' Failed with exit code 2
  ----------------------------------------
  ERROR: Failed building wheel for pycocotools
  Running setup.py clean for pycocotools
  ERROR: Command errored out with exit status 1:
   command: 'c:\users\la01043601\ml_cameravision\humandetection\env\scripts\python.exe' -u -c 'import io,'"'"'exec'"'"'))' clean --all
       cwd: C:\Users\la01043601\AppData\Local\Temp\pip-req-build-htao1r08
  Complete output (11 lines):
  Traceback (most recent call last):
    File "<string>",line 1,in <module>
    File "C:\Users\la01043601\AppData\Local\Temp\pip-req-build-htao1r08\PythonAPI\setup.py",line 25,in <module>
      cythonize(ext_modules)
    File "c:\users\la01043601\ml_cameravision\humandetection\env\lib\site-packages\Cython\Build\Dependencies.py",line 965,in cythonize
      module_list,module_Metadata = create_extension_list(
    File "c:\users\la01043601\ml_cameravision\humandetection\env\lib\site-packages\Cython\Build\Dependencies.py",line 815,in create_extension_list
      for file in nonempty(sorted(extended_iglob(filepattern)),"'%s' doesn't match any files" % filepattern):
    File "c:\users\la01043601\ml_cameravision\humandetection\env\lib\site-packages\Cython\Build\Dependencies.py",line 114,in nonempty
      raise ValueError(error_msg)
  ValueError: 'pycocotools/_mask.pyx' doesn't match any files
  ----------------------------------------
  ERROR: Failed cleaning build dir for pycocotools
Failed to build pycocotools
Installing collected packages: pycocotools
    Running setup.py install for pycocotools ... error
    ERROR: Command errored out with exit status 1:
     command: 'c:\users\la01043601\ml_cameravision\humandetection\env\scripts\python.exe' -u -c 'import io,'"'"'exec'"'"'))' install --record 'C:\Users\la01043601\AppData\Local\Temp\pip-record-ok0x1q7g\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\la01043601\ml_cameravision\humandetection\env\include\site\python3.9\pycocotools'
         cwd: C:\Users\la01043601\AppData\Local\Temp\pip-req-build-htao1r08\PythonAPI
    Complete output (9 lines):
    running install
    running build
    running build_py
    running build_ext
    building 'pycocotools._mask' extension
    C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30037\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:\users\la01043601\ml_cameravision\humandetection\env\lib\site-packages\numpy\core\include -I../common -Ic:\users\la01043601\ml_cameravision\humandetection\env\include -IC:\python39\include -IC:\python39\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30037\ATLMFC\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30037\include /Tc../common/maskApi.c /Fobuild\temp.win-amd64-3.9\Release\../common/maskApi.obj
    maskApi.c
    ../common/maskApi.c(8): Fatal error C1083: Cannot open include file: 'math.h': No such file or directory
    error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.29.30037\\bin\\HostX86\\x64\\cl.exe' Failed with exit code 2
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\la01043601\ml_cameravision\humandetection\env\scripts\python.exe' -u -c 'import io,'"'"'exec'"'"'))' install --record 'C:\Users\la01043601\AppData\Local\Temp\pip-record-ok0x1q7g\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\la01043601\ml_cameravision\humandetection\env\include\site\python3.9\pycocotools' Check the logs for full command output.

我已经尝试安装 Visual C++ Build Tools(许多其他答案推荐的 2015 版本),但出现无法找到/下载安装包的错误,所以我确保我有 2019 版本的更新工具,它们被添加到我的路径中。 我得到的错误like this one。我还关注了该解决方底部的视频,但没有帮助。

我尝试使用建议的 pycocotools (pycocotools-windows) 安装 Windows,但出现以下错误

(env) PS C:\Users\la01043601\ML_Cameravision\humanDetection> pip install cocoapi-windows
ERROR: Could not find a version that satisfies the requirement cocoapi-windows (from versions: none)
ERROR: No matching distribution found for cocoapi-windows
(env) PS C:\Users\la01043601\ML_Cameravision\humanDetection> pip install pycocotools-windows
ERROR: Could not find a version that satisfies the requirement pycocotools-windows (from versions: none)
ERROR: No matching distribution found for pycocotools-windows

Python 和 pip 在我的 Windows 路径上。我已经无计可施了。为此我放弃了一个教程,只是发现下一个教程也有 pycocotools 依赖项。

(也接受不使用pycocotools的Tensorflow对象检测教程的建议!需要一个像样的教程,因为我是初学者)

编辑:现在还尝试通过以下方式运行 setup.py 文件,仍然遇到找不到 math.h 文件的问题...

(env) PS C:\Users\la01043601\ML_Cameravision\humanDetection\sandBox\cocoapi\PythonAPI> python setup.py build_ext --inplace
Compiling pycocotools/_mask.pyx because it changed.
[1/1] Cythonizing pycocotools/_mask.pyx
C:\Users\la01043601\ML_Cameravision\humanDetection\env\lib\site-packages\Cython\Compiler\Main.py:369: FutureWarning: Cython directive 'language_level' not set,using 2 for Now (Py2). This will change in a later release! File: C:\Users\la01043601\ML_Cameravision\humanDetection\sandBox\cocoapi\PythonAPI\pycocotools\_mask.pyx
  tree = Parsing.p_module(s,full_module_name)
running build_ext
building 'pycocotools._mask' extension
creating build
creating build\temp.win-amd64-3.9
creating build\temp.win-amd64-3.9\common
creating build\temp.win-amd64-3.9\Release
creating build\temp.win-amd64-3.9\Release\pycocotools
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30037\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\la01043601\ML_Cameravision\humanDetection\env\lib\site-packages\numpy\core\include -I../common -IC:\Users\la01043601\ML_Cameravision\humanDetection\env\include -IC:\python39\include -IC:\python39\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30037\ATLMFC\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30037\include /Tc../common/maskApi.c /Fobuild\temp.win-amd64-3.9\Release\../common/maskApi.obj
maskApi.c
../common/maskApi.c(8): Fatal error C1083: Cannot open include file: 'math.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.29.30037\\bin\\HostX86\\x64\\cl.exe' Failed with exit code 2

Edit edit 我忘了提到,在过去的几天里,我还尝试对 math.h error 进行故障排除,这表明将包含语句从“math.h”切换为“cmath”,并使用“引号”而不是尖括号,并且由于从下载的存储库安装时会发生这种情况,因此我什至分叉了存储库,并在 my version 上进行了更改以从那里下载。错误如下(现在与丢失的“crtdbg.h”文件有关,我不明白构建工具中的所有内容是如何工作的):

(env) PS C:\Users\la01043601\ML_Cameravision\humanDetection> pip install git+https://github.com/broccoli-Hunter/cocoapi.git#subdirectory=PythonAPI
Collecting git+https://github.com/broccoli-Hunter/cocoapi.git#subdirectory=PythonAPI
  cloning https://github.com/broccoli-Hunter/cocoapi.git to c:\users\la01043601\appdata\local\temp\pip-req-build-atepfcnd
  Running command git clone -q https://github.com/broccoli-Hunter/cocoapi.git 'C:\Users\la01043601\AppData\Local\Temp\pip-req-build-atepfcnd'
Building wheels for collected packages: pycocotools
  Building wheel for pycocotools (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: 'c:\users\la01043601\ml_cameravision\humandetection\env\scripts\python.exe' -u -c 'import io,tokenize; sys.argv[0] = '"'"'C:\\Users\\la01043601\\AppData\\Local\\Temp\\pip-req-build-atepfcnd\\PythonAPI\\setup.py'"'"'; __file__='"'"'C:\\Users\\la01043601\\AppData\\Local\\Temp\\pip-req-build-atepfcnd\\PythonAPI\\setup.py'"'"';f = getattr(tokenize,'"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\la01043601\AppData\Local\Temp\pip-wheel-4bje9txk'
       cwd: C:\Users\la01043601\AppData\Local\Temp\pip-req-build-atepfcnd\PythonAPI
  Complete output (20 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build\lib.win-amd64-3.9
  creating build\lib.win-amd64-3.9\pycocotools
  copying pycocotools\coco.py -> build\lib.win-amd64-3.9\pycocotools
  copying pycocotools\cocoeval.py -> build\lib.win-amd64-3.9\pycocotools
  copying pycocotools\mask.py -> build\lib.win-amd64-3.9\pycocotools
  copying pycocotools\__init__.py -> build\lib.win-amd64-3.9\pycocotools
  running build_ext
  building 'pycocotools._mask' extension
  creating build\temp.win-amd64-3.9
  creating build\temp.win-amd64-3.9\common
  creating build\temp.win-amd64-3.9\Release
  creating build\temp.win-amd64-3.9\Release\pycocotools
  C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30037\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:\users\la01043601\ml_cameravision\humandetection\env\lib\site-packages\numpy\core\include -I../common -Ic:\users\la01043601\ml_cameravision\humandetection\env\include -IC:\python39\include -IC:\python39\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30037\ATLMFC\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30037\include /Tc../common/maskApi.c /Fobuild\temp.win-amd64-3.9\Release\../common/maskApi.obj
  maskApi.c
  C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30037\include\yvals.h(12): Fatal error C1083: Cannot open include file: 'crtdbg.h': No such file or directory
  error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.29.30037\\bin\\HostX86\\x64\\cl.exe' Failed with exit code 2
  ----------------------------------------
  ERROR: Failed building wheel for pycocotools
  Running setup.py clean for pycocotools
  ERROR: Command errored out with exit status 1:
   command: 'c:\users\la01043601\ml_cameravision\humandetection\env\scripts\python.exe' -u -c 'import io,'"'"'exec'"'"'))' clean --all
       cwd: C:\Users\la01043601\AppData\Local\Temp\pip-req-build-atepfcnd
  Complete output (11 lines):
  Traceback (most recent call last):
    File "<string>",in <module>
    File "C:\Users\la01043601\AppData\Local\Temp\pip-req-build-atepfcnd\PythonAPI\setup.py",in nonempty
      raise ValueError(error_msg)
  ValueError: 'pycocotools/_mask.pyx' doesn't match any files
  ----------------------------------------
  ERROR: Failed cleaning build dir for pycocotools
Failed to build pycocotools

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)