Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/287.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python pip安装pybgs时出错-如何解决此错误:错误:command';cmake';失败:没有这样的文件或目录_Python_Pip - Fatal编程技术网

Python pip安装pybgs时出错-如何解决此错误:错误:command';cmake';失败:没有这样的文件或目录

Python pip安装pybgs时出错-如何解决此错误:错误:command';cmake';失败:没有这样的文件或目录,python,pip,Python,Pip,我想安装BGSLibrary(),但我有一个错误。我不知道该怎么办。。。 以下是错误: (base) C:\Users\qh742176>pip install pybgs Collecting pybgs Using cached pybgs-3.0.0.post2.tar.gz (850 kB) Building wheels for collected packages: pybgs Building wheel for pybgs (setup.py) ... error

我想安装BGSLibrary(),但我有一个错误。我不知道该怎么办。。。 以下是错误:

(base) C:\Users\qh742176>pip install pybgs
Collecting pybgs
  Using cached pybgs-3.0.0.post2.tar.gz (850 kB)
Building wheels for collected packages: pybgs
  Building wheel for pybgs (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: 'C:\ProgramData\Anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\qh742176\\AppData\\Local\\Temp\\pip-install-fjuvyr0k\\pybgs_ac5042fa9d0c4e1faf1ee0536d1a5f40\\setup.py'"'"'; __file__='"'"'C:\\Users\\qh742176\\AppData\\Local\\Temp\\pip-install-fjuvyr0k\\pybgs_ac5042fa9d0c4e1faf1ee0536d1a5f40\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\qh742176\AppData\Local\Temp\pip-wheel-hlpvbn7p'
       cwd: C:\Users\qh742176\AppData\Local\Temp\pip-install-fjuvyr0k\pybgs_ac5042fa9d0c4e1faf1ee0536d1a5f40\
  Complete output (7 lines):
  running bdist_wheel
  running build
  running build_ext
  Preparing the build environment
  Configuring cmake project
  cmake -HC:\Users\qh742176\AppData\Local\Temp\pip-install-fjuvyr0k\pybgs_ac5042fa9d0c4e1faf1ee0536d1a5f40 -Bbuild\temp.win-amd64-3.8\Release -DPYTHON_EXECUTABLE=C:\ProgramData\Anaconda3\python.exe -DBGS_CORE_STATIC=ON -DBGS_PYTHON_SUPPORT=ON -DBGS_PYTHON_ONLY=ON -DBGS_PYTHON_VERSION=3.8
  error: command 'cmake' failed: No such file or directory
  ----------------------------------------
  ERROR: Failed building wheel for pybgs
  Running setup.py clean for pybgs
Failed to build pybgs
Installing collected packages: pybgs
    Running setup.py install for pybgs ... error
    ERROR: Command errored out with exit status 1:
     command: 'C:\ProgramData\Anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\qh742176\\AppData\\Local\\Temp\\pip-install-fjuvyr0k\\pybgs_ac5042fa9d0c4e1faf1ee0536d1a5f40\\setup.py'"'"'; __file__='"'"'C:\\Users\\qh742176\\AppData\\Local\\Temp\\pip-install-fjuvyr0k\\pybgs_ac5042fa9d0c4e1faf1ee0536d1a5f40\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\qh742176\AppData\Local\Temp\pip-record-fxqcfc47\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\ProgramData\Anaconda3\Include\pybgs'
         cwd: C:\Users\qh742176\AppData\Local\Temp\pip-install-fjuvyr0k\pybgs_ac5042fa9d0c4e1faf1ee0536d1a5f40\
    Complete output (7 lines):
    running install
    running build
    running build_ext
    Preparing the build environment
    Configuring cmake project
    cmake -HC:\Users\qh742176\AppData\Local\Temp\pip-install-fjuvyr0k\pybgs_ac5042fa9d0c4e1faf1ee0536d1a5f40 -Bbuild\temp.win-amd64-3.8\Release -DPYTHON_EXECUTABLE=C:\ProgramData\Anaconda3\python.exe -DBGS_CORE_STATIC=ON -DBGS_PYTHON_SUPPORT=ON -DBGS_PYTHON_ONLY=ON -DBGS_PYTHON_VERSION=3.8
    error: command 'cmake' failed: No such file or directory
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\ProgramData\Anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\qh742176\\AppData\\Local\\Temp\\pip-install-fjuvyr0k\\pybgs_ac5042fa9d0c4e1faf1ee0536d1a5f40\\setup.py'"'"'; __file__='"'"'C:\\Users\\qh742176\\AppData\\Local\\Temp\\pip-install-fjuvyr0k\\pybgs_ac5042fa9d0c4e1faf1ee0536d1a5f40\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\qh742176\AppData\Local\Temp\pip-record-fxqcfc47\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\ProgramData\Anaconda3\Include\pybgs' Check the logs for full command output.
(base) C:\Users\quent>pip install pybgs
Collecting pybgs
  Using cached pybgs-3.0.0.post2.tar.gz (850 kB)
Building wheels for collected packages: pybgs
  Building wheel for pybgs (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: 'C:\ProgramData\Anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\quent\\AppData\\Local\\Temp\\pip-install-ii8ti1lp\\pybgs_4f048535b22c4fd299172823d5938fb6\\setup.py'"'"'; __file__='"'"'C:\\Users\\quent\\AppData\\Local\\Temp\\pip-install-ii8ti1lp\\pybgs_4f048535b22c4fd299172823d5938fb6\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\quent\AppData\Local\Temp\pip-wheel-ao02fvnp'
       cwd: C:\Users\quent\AppData\Local\Temp\pip-install-ii8ti1lp\pybgs_4f048535b22c4fd299172823d5938fb6\
  Complete output (61 lines):
  running bdist_wheel
  running build
  running build_ext
  Preparing the build environment
  Configuring cmake project
  C:\Program Files\CMake\bin\cmake.exe -HC:\Users\quent\AppData\Local\Temp\pip-install-ii8ti1lp\pybgs_4f048535b22c4fd299172823d5938fb6 -Bbuild\temp.win-amd64-3.8\Release -DPYTHON_EXECUTABLE=C:\ProgramData\Anaconda3\python.exe -DBGS_CORE_STATIC=ON -DBGS_PYTHON_SUPPORT=ON -DBGS_PYTHON_ONLY=ON -DBGS_PYTHON_VERSION=3.8
  -- Building for: Visual Studio 16 2019
  -- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19043.
  -- The C compiler identification is MSVC 19.28.29915.0
  -- The CXX compiler identification is MSVC 19.28.29915.0
  -- Detecting C compiler ABI info
  -- Detecting C compiler ABI info - done
  -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.28.29910/bin/Hostx64/x64/cl.exe - skipped
  -- Detecting C compile features
  -- Detecting C compile features - done
  -- Detecting CXX compiler ABI info
  -- Detecting CXX compiler ABI info - done
  -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.28.29910/bin/Hostx64/x64/cl.exe - skipped
  -- Detecting CXX compile features
  -- Detecting CXX compile features - done
  --
  -- BGS_PYTHON_SUPPORT: ON
  -- BGS_PYTHON_ONLY:    ON
  -- BGS_CORE_STATIC:    ON
  -- PYTHON VERSION: 3.8
  -- OpenCV ARCH: x64
  -- OpenCV RUNTIME: vc15
  -- OpenCV STATIC: OFF
  -- Found OpenCV: C:/Users/quent/Downloads/opencv/build (found version "4.5.2")
  -- Found OpenCV 4.5.2 in C:/Users/quent/Downloads/opencv/build/x64/vc15/lib
  -- You might need to add C:\Users\quent\Downloads\opencv\build\x64\vc15\bin to your PATH to be able to run your applications.
  --
  -- OpenCV library status:
  --     version: 4.5.2
  --     libraries: opencv_calib3d;opencv_core;opencv_dnn;opencv_features2d;opencv_flann;opencv_gapi;opencv_highgui;opencv_imgcodecs;opencv_imgproc;opencv_ml;opencv_objdetect;opencv_photo;opencv_stitching;opencv_video;opencv_videoio;opencv_world
  --     include path: C:/Users/quent/Downloads/opencv/build/include

  -- Found PythonInterp: C:/ProgramData/Anaconda3/python.exe (found suitable version "3.8.8", minimum required is "3.8")
  -- Found PythonLibs: C:/ProgramData/Anaconda3/libs/Python38.lib
  -- pybind11 v2.3.dev1
  --
  -- Python library status:
  --     executable: C:/ProgramData/Anaconda3/python.exe
  --     library:
  --     include path: C:/ProgramData/Anaconda3/include
  -- NUMPY_INCLUDE_DIR: C:\ProgramData\Anaconda3\lib\site-packages\numpy\core\include

  -- Bulding bgslibrary_core STATIC
  -- Configuring done
  -- Generating done
  -- Build files have been written to: C:/Users/quent/AppData/Local/Temp/pip-install-ii8ti1lp/pybgs_4f048535b22c4fd299172823d5938fb6/build/temp.win-amd64-3.8/Release
  Building binaries
  C:\Program Files\CMake\bin\cmake.exe --build build\temp.win-amd64-3.8\Release --config Release -- -j8
  Microsoft (R) Build Engine version 16.9.0+5e4b48a27 pour .NET Framework
  Copyright (C) Microsoft Corporation. Tous droits r‚serv‚s.

  MSBUILD : error MSB1001: Commutateur inconnu.
  Commutateurÿ:ÿ-j8

  Pour la syntaxe du commutateur, tapez "MSBuild -help"
  error: command 'C:\\Program Files\\CMake\\bin\\cmake.exe' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for pybgs
  Running setup.py clean for pybgs
Failed to build pybgs
Installing collected packages: pybgs
    Running setup.py install for pybgs ... error
    ERROR: Command errored out with exit status 1:
     command: 'C:\ProgramData\Anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\quent\\AppData\\Local\\Temp\\pip-install-ii8ti1lp\\pybgs_4f048535b22c4fd299172823d5938fb6\\setup.py'"'"'; __file__='"'"'C:\\Users\\quent\\AppData\\Local\\Temp\\pip-install-ii8ti1lp\\pybgs_4f048535b22c4fd299172823d5938fb6\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\quent\AppData\Local\Temp\pip-record-szv2k3di\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\ProgramData\Anaconda3\Include\pybgs'
         cwd: C:\Users\quent\AppData\Local\Temp\pip-install-ii8ti1lp\pybgs_4f048535b22c4fd299172823d5938fb6\
    Complete output (61 lines):
    running install
    running build
    running build_ext
    Preparing the build environment
    Configuring cmake project
    C:\Program Files\CMake\bin\cmake.exe -HC:\Users\quent\AppData\Local\Temp\pip-install-ii8ti1lp\pybgs_4f048535b22c4fd299172823d5938fb6 -Bbuild\temp.win-amd64-3.8\Release -DPYTHON_EXECUTABLE=C:\ProgramData\Anaconda3\python.exe -DBGS_CORE_STATIC=ON -DBGS_PYTHON_SUPPORT=ON -DBGS_PYTHON_ONLY=ON -DBGS_PYTHON_VERSION=3.8
    -- Building for: Visual Studio 16 2019
    -- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19043.
    -- The C compiler identification is MSVC 19.28.29915.0
    -- The CXX compiler identification is MSVC 19.28.29915.0
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done
    -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.28.29910/bin/Hostx64/x64/cl.exe - skipped
    -- Detecting C compile features
    -- Detecting C compile features - done
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.28.29910/bin/Hostx64/x64/cl.exe - skipped
    -- Detecting CXX compile features
    -- Detecting CXX compile features - done
    --
    -- BGS_PYTHON_SUPPORT: ON
    -- BGS_PYTHON_ONLY:    ON
    -- BGS_CORE_STATIC:    ON
    -- PYTHON VERSION: 3.8
    -- OpenCV ARCH: x64
    -- OpenCV RUNTIME: vc15
    -- OpenCV STATIC: OFF
    -- Found OpenCV: C:/Users/quent/Downloads/opencv/build (found version "4.5.2")
    -- Found OpenCV 4.5.2 in C:/Users/quent/Downloads/opencv/build/x64/vc15/lib
    -- You might need to add C:\Users\quent\Downloads\opencv\build\x64\vc15\bin to your PATH to be able to run your applications.
    --
    -- OpenCV library status:
    --     version: 4.5.2
    --     libraries: opencv_calib3d;opencv_core;opencv_dnn;opencv_features2d;opencv_flann;opencv_gapi;opencv_highgui;opencv_imgcodecs;opencv_imgproc;opencv_ml;opencv_objdetect;opencv_photo;opencv_stitching;opencv_video;opencv_videoio;opencv_world
    --     include path: C:/Users/quent/Downloads/opencv/build/include

    -- Found PythonInterp: C:/ProgramData/Anaconda3/python.exe (found suitable version "3.8.8", minimum required is "3.8")
    -- Found PythonLibs: C:/ProgramData/Anaconda3/libs/Python38.lib
    -- pybind11 v2.3.dev1
    --
    -- Python library status:
    --     executable: C:/ProgramData/Anaconda3/python.exe
    --     library:
    --     include path: C:/ProgramData/Anaconda3/include
    -- NUMPY_INCLUDE_DIR: C:\ProgramData\Anaconda3\lib\site-packages\numpy\core\include

    -- Bulding bgslibrary_core STATIC
    -- Configuring done
    -- Generating done
    -- Build files have been written to: C:/Users/quent/AppData/Local/Temp/pip-install-ii8ti1lp/pybgs_4f048535b22c4fd299172823d5938fb6/build/temp.win-amd64-3.8/Release
    Building binaries
    C:\Program Files\CMake\bin\cmake.exe --build build\temp.win-amd64-3.8\Release --config Release -- -j8
    Microsoft (R) Build Engine version 16.9.0+5e4b48a27 pour .NET Framework
    Copyright (C) Microsoft Corporation. Tous droits r‚serv‚s.

    MSBUILD : error MSB1001: Commutateur inconnu.
    Commutateurÿ:ÿ-j8

    Pour la syntaxe du commutateur, tapez "MSBuild -help"
    error: command 'C:\\Program Files\\CMake\\bin\\cmake.exe' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\ProgramData\Anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\quent\\AppData\\Local\\Temp\\pip-install-ii8ti1lp\\pybgs_4f048535b22c4fd299172823d5938fb6\\setup.py'"'"'; __file__='"'"'C:\\Users\\quent\\AppData\\Local\\Temp\\pip-install-ii8ti1lp\\pybgs_4f048535b22c4fd299172823d5938fb6\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\quent\AppData\Local\Temp\pip-record-szv2k3di\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\ProgramData\Anaconda3\Include\pybgs' Check the logs for full command output.
我有蟒蛇和蟒蛇。 Python 3.8.8

更新: 我既没有下载OpenCV也没有下载Visual Studio。 现在我有了VisualStudioCommunity2019和OpenCV 4.5.2。 但是现在在构建二进制文件的过程中,我遇到了以下错误:MSBUILD:error MSB001:Unknow开关。 以下是错误:

(base) C:\Users\qh742176>pip install pybgs
Collecting pybgs
  Using cached pybgs-3.0.0.post2.tar.gz (850 kB)
Building wheels for collected packages: pybgs
  Building wheel for pybgs (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: 'C:\ProgramData\Anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\qh742176\\AppData\\Local\\Temp\\pip-install-fjuvyr0k\\pybgs_ac5042fa9d0c4e1faf1ee0536d1a5f40\\setup.py'"'"'; __file__='"'"'C:\\Users\\qh742176\\AppData\\Local\\Temp\\pip-install-fjuvyr0k\\pybgs_ac5042fa9d0c4e1faf1ee0536d1a5f40\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\qh742176\AppData\Local\Temp\pip-wheel-hlpvbn7p'
       cwd: C:\Users\qh742176\AppData\Local\Temp\pip-install-fjuvyr0k\pybgs_ac5042fa9d0c4e1faf1ee0536d1a5f40\
  Complete output (7 lines):
  running bdist_wheel
  running build
  running build_ext
  Preparing the build environment
  Configuring cmake project
  cmake -HC:\Users\qh742176\AppData\Local\Temp\pip-install-fjuvyr0k\pybgs_ac5042fa9d0c4e1faf1ee0536d1a5f40 -Bbuild\temp.win-amd64-3.8\Release -DPYTHON_EXECUTABLE=C:\ProgramData\Anaconda3\python.exe -DBGS_CORE_STATIC=ON -DBGS_PYTHON_SUPPORT=ON -DBGS_PYTHON_ONLY=ON -DBGS_PYTHON_VERSION=3.8
  error: command 'cmake' failed: No such file or directory
  ----------------------------------------
  ERROR: Failed building wheel for pybgs
  Running setup.py clean for pybgs
Failed to build pybgs
Installing collected packages: pybgs
    Running setup.py install for pybgs ... error
    ERROR: Command errored out with exit status 1:
     command: 'C:\ProgramData\Anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\qh742176\\AppData\\Local\\Temp\\pip-install-fjuvyr0k\\pybgs_ac5042fa9d0c4e1faf1ee0536d1a5f40\\setup.py'"'"'; __file__='"'"'C:\\Users\\qh742176\\AppData\\Local\\Temp\\pip-install-fjuvyr0k\\pybgs_ac5042fa9d0c4e1faf1ee0536d1a5f40\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\qh742176\AppData\Local\Temp\pip-record-fxqcfc47\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\ProgramData\Anaconda3\Include\pybgs'
         cwd: C:\Users\qh742176\AppData\Local\Temp\pip-install-fjuvyr0k\pybgs_ac5042fa9d0c4e1faf1ee0536d1a5f40\
    Complete output (7 lines):
    running install
    running build
    running build_ext
    Preparing the build environment
    Configuring cmake project
    cmake -HC:\Users\qh742176\AppData\Local\Temp\pip-install-fjuvyr0k\pybgs_ac5042fa9d0c4e1faf1ee0536d1a5f40 -Bbuild\temp.win-amd64-3.8\Release -DPYTHON_EXECUTABLE=C:\ProgramData\Anaconda3\python.exe -DBGS_CORE_STATIC=ON -DBGS_PYTHON_SUPPORT=ON -DBGS_PYTHON_ONLY=ON -DBGS_PYTHON_VERSION=3.8
    error: command 'cmake' failed: No such file or directory
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\ProgramData\Anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\qh742176\\AppData\\Local\\Temp\\pip-install-fjuvyr0k\\pybgs_ac5042fa9d0c4e1faf1ee0536d1a5f40\\setup.py'"'"'; __file__='"'"'C:\\Users\\qh742176\\AppData\\Local\\Temp\\pip-install-fjuvyr0k\\pybgs_ac5042fa9d0c4e1faf1ee0536d1a5f40\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\qh742176\AppData\Local\Temp\pip-record-fxqcfc47\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\ProgramData\Anaconda3\Include\pybgs' Check the logs for full command output.
(base) C:\Users\quent>pip install pybgs
Collecting pybgs
  Using cached pybgs-3.0.0.post2.tar.gz (850 kB)
Building wheels for collected packages: pybgs
  Building wheel for pybgs (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: 'C:\ProgramData\Anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\quent\\AppData\\Local\\Temp\\pip-install-ii8ti1lp\\pybgs_4f048535b22c4fd299172823d5938fb6\\setup.py'"'"'; __file__='"'"'C:\\Users\\quent\\AppData\\Local\\Temp\\pip-install-ii8ti1lp\\pybgs_4f048535b22c4fd299172823d5938fb6\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\quent\AppData\Local\Temp\pip-wheel-ao02fvnp'
       cwd: C:\Users\quent\AppData\Local\Temp\pip-install-ii8ti1lp\pybgs_4f048535b22c4fd299172823d5938fb6\
  Complete output (61 lines):
  running bdist_wheel
  running build
  running build_ext
  Preparing the build environment
  Configuring cmake project
  C:\Program Files\CMake\bin\cmake.exe -HC:\Users\quent\AppData\Local\Temp\pip-install-ii8ti1lp\pybgs_4f048535b22c4fd299172823d5938fb6 -Bbuild\temp.win-amd64-3.8\Release -DPYTHON_EXECUTABLE=C:\ProgramData\Anaconda3\python.exe -DBGS_CORE_STATIC=ON -DBGS_PYTHON_SUPPORT=ON -DBGS_PYTHON_ONLY=ON -DBGS_PYTHON_VERSION=3.8
  -- Building for: Visual Studio 16 2019
  -- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19043.
  -- The C compiler identification is MSVC 19.28.29915.0
  -- The CXX compiler identification is MSVC 19.28.29915.0
  -- Detecting C compiler ABI info
  -- Detecting C compiler ABI info - done
  -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.28.29910/bin/Hostx64/x64/cl.exe - skipped
  -- Detecting C compile features
  -- Detecting C compile features - done
  -- Detecting CXX compiler ABI info
  -- Detecting CXX compiler ABI info - done
  -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.28.29910/bin/Hostx64/x64/cl.exe - skipped
  -- Detecting CXX compile features
  -- Detecting CXX compile features - done
  --
  -- BGS_PYTHON_SUPPORT: ON
  -- BGS_PYTHON_ONLY:    ON
  -- BGS_CORE_STATIC:    ON
  -- PYTHON VERSION: 3.8
  -- OpenCV ARCH: x64
  -- OpenCV RUNTIME: vc15
  -- OpenCV STATIC: OFF
  -- Found OpenCV: C:/Users/quent/Downloads/opencv/build (found version "4.5.2")
  -- Found OpenCV 4.5.2 in C:/Users/quent/Downloads/opencv/build/x64/vc15/lib
  -- You might need to add C:\Users\quent\Downloads\opencv\build\x64\vc15\bin to your PATH to be able to run your applications.
  --
  -- OpenCV library status:
  --     version: 4.5.2
  --     libraries: opencv_calib3d;opencv_core;opencv_dnn;opencv_features2d;opencv_flann;opencv_gapi;opencv_highgui;opencv_imgcodecs;opencv_imgproc;opencv_ml;opencv_objdetect;opencv_photo;opencv_stitching;opencv_video;opencv_videoio;opencv_world
  --     include path: C:/Users/quent/Downloads/opencv/build/include

  -- Found PythonInterp: C:/ProgramData/Anaconda3/python.exe (found suitable version "3.8.8", minimum required is "3.8")
  -- Found PythonLibs: C:/ProgramData/Anaconda3/libs/Python38.lib
  -- pybind11 v2.3.dev1
  --
  -- Python library status:
  --     executable: C:/ProgramData/Anaconda3/python.exe
  --     library:
  --     include path: C:/ProgramData/Anaconda3/include
  -- NUMPY_INCLUDE_DIR: C:\ProgramData\Anaconda3\lib\site-packages\numpy\core\include

  -- Bulding bgslibrary_core STATIC
  -- Configuring done
  -- Generating done
  -- Build files have been written to: C:/Users/quent/AppData/Local/Temp/pip-install-ii8ti1lp/pybgs_4f048535b22c4fd299172823d5938fb6/build/temp.win-amd64-3.8/Release
  Building binaries
  C:\Program Files\CMake\bin\cmake.exe --build build\temp.win-amd64-3.8\Release --config Release -- -j8
  Microsoft (R) Build Engine version 16.9.0+5e4b48a27 pour .NET Framework
  Copyright (C) Microsoft Corporation. Tous droits r‚serv‚s.

  MSBUILD : error MSB1001: Commutateur inconnu.
  Commutateurÿ:ÿ-j8

  Pour la syntaxe du commutateur, tapez "MSBuild -help"
  error: command 'C:\\Program Files\\CMake\\bin\\cmake.exe' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for pybgs
  Running setup.py clean for pybgs
Failed to build pybgs
Installing collected packages: pybgs
    Running setup.py install for pybgs ... error
    ERROR: Command errored out with exit status 1:
     command: 'C:\ProgramData\Anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\quent\\AppData\\Local\\Temp\\pip-install-ii8ti1lp\\pybgs_4f048535b22c4fd299172823d5938fb6\\setup.py'"'"'; __file__='"'"'C:\\Users\\quent\\AppData\\Local\\Temp\\pip-install-ii8ti1lp\\pybgs_4f048535b22c4fd299172823d5938fb6\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\quent\AppData\Local\Temp\pip-record-szv2k3di\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\ProgramData\Anaconda3\Include\pybgs'
         cwd: C:\Users\quent\AppData\Local\Temp\pip-install-ii8ti1lp\pybgs_4f048535b22c4fd299172823d5938fb6\
    Complete output (61 lines):
    running install
    running build
    running build_ext
    Preparing the build environment
    Configuring cmake project
    C:\Program Files\CMake\bin\cmake.exe -HC:\Users\quent\AppData\Local\Temp\pip-install-ii8ti1lp\pybgs_4f048535b22c4fd299172823d5938fb6 -Bbuild\temp.win-amd64-3.8\Release -DPYTHON_EXECUTABLE=C:\ProgramData\Anaconda3\python.exe -DBGS_CORE_STATIC=ON -DBGS_PYTHON_SUPPORT=ON -DBGS_PYTHON_ONLY=ON -DBGS_PYTHON_VERSION=3.8
    -- Building for: Visual Studio 16 2019
    -- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19043.
    -- The C compiler identification is MSVC 19.28.29915.0
    -- The CXX compiler identification is MSVC 19.28.29915.0
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done
    -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.28.29910/bin/Hostx64/x64/cl.exe - skipped
    -- Detecting C compile features
    -- Detecting C compile features - done
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.28.29910/bin/Hostx64/x64/cl.exe - skipped
    -- Detecting CXX compile features
    -- Detecting CXX compile features - done
    --
    -- BGS_PYTHON_SUPPORT: ON
    -- BGS_PYTHON_ONLY:    ON
    -- BGS_CORE_STATIC:    ON
    -- PYTHON VERSION: 3.8
    -- OpenCV ARCH: x64
    -- OpenCV RUNTIME: vc15
    -- OpenCV STATIC: OFF
    -- Found OpenCV: C:/Users/quent/Downloads/opencv/build (found version "4.5.2")
    -- Found OpenCV 4.5.2 in C:/Users/quent/Downloads/opencv/build/x64/vc15/lib
    -- You might need to add C:\Users\quent\Downloads\opencv\build\x64\vc15\bin to your PATH to be able to run your applications.
    --
    -- OpenCV library status:
    --     version: 4.5.2
    --     libraries: opencv_calib3d;opencv_core;opencv_dnn;opencv_features2d;opencv_flann;opencv_gapi;opencv_highgui;opencv_imgcodecs;opencv_imgproc;opencv_ml;opencv_objdetect;opencv_photo;opencv_stitching;opencv_video;opencv_videoio;opencv_world
    --     include path: C:/Users/quent/Downloads/opencv/build/include

    -- Found PythonInterp: C:/ProgramData/Anaconda3/python.exe (found suitable version "3.8.8", minimum required is "3.8")
    -- Found PythonLibs: C:/ProgramData/Anaconda3/libs/Python38.lib
    -- pybind11 v2.3.dev1
    --
    -- Python library status:
    --     executable: C:/ProgramData/Anaconda3/python.exe
    --     library:
    --     include path: C:/ProgramData/Anaconda3/include
    -- NUMPY_INCLUDE_DIR: C:\ProgramData\Anaconda3\lib\site-packages\numpy\core\include

    -- Bulding bgslibrary_core STATIC
    -- Configuring done
    -- Generating done
    -- Build files have been written to: C:/Users/quent/AppData/Local/Temp/pip-install-ii8ti1lp/pybgs_4f048535b22c4fd299172823d5938fb6/build/temp.win-amd64-3.8/Release
    Building binaries
    C:\Program Files\CMake\bin\cmake.exe --build build\temp.win-amd64-3.8\Release --config Release -- -j8
    Microsoft (R) Build Engine version 16.9.0+5e4b48a27 pour .NET Framework
    Copyright (C) Microsoft Corporation. Tous droits r‚serv‚s.

    MSBUILD : error MSB1001: Commutateur inconnu.
    Commutateurÿ:ÿ-j8

    Pour la syntaxe du commutateur, tapez "MSBuild -help"
    error: command 'C:\\Program Files\\CMake\\bin\\cmake.exe' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\ProgramData\Anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\quent\\AppData\\Local\\Temp\\pip-install-ii8ti1lp\\pybgs_4f048535b22c4fd299172823d5938fb6\\setup.py'"'"'; __file__='"'"'C:\\Users\\quent\\AppData\\Local\\Temp\\pip-install-ii8ti1lp\\pybgs_4f048535b22c4fd299172823d5938fb6\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\quent\AppData\Local\Temp\pip-record-szv2k3di\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\ProgramData\Anaconda3\Include\pybgs' Check the logs for full command output.

错误:命令“cmake”失败:没有这样的文件或目录

当您尝试安装pybgs时,您没有安装CMake,或者它在路径中不可用

明确表示您需要:

* OpenCV 2.4.x, 3.4.x, 4.x
* Visual Studio 2013, 2015, 2017
* CMake 3.12 or higher

如果已经安装了这些工具,则可能需要激活visual studio的开发提示。

是否有cmakeinstalled@Sujay我既没有下载Cmake也没有下载Visual Studio。但现在出现了以下错误:MSBUILD:error MSB001:Unknow开关。(见上面的全部错误)我没有下载Cmake或Visual Studio。但现在出现了以下错误:MSBUILD:error MSB001:Unknow开关。(见上面的全部错误)@QuentinHamard觉得他们的构建脚本中有一个bug。msbuild afaik中没有“-j”标志。