Skip to content

i get error #1

@sc0rp10n-py

Description

@sc0rp10n-py

i have followed the same steps

I have tried python version 3.11.x and 3.9.10

get the same error

i did make a environment then did

pip install pybind11

then created build directory

went to it and did cmake ..

got some errors, which I fixed by setting my paths of pybind11 and opencv

then when I did make

i got no use ful output

and when I did make install

same no useful output

then did install numpy and opencv-python package

but then when i do

pip install ./

I get this error

my output

Processing c:\users\princ\downloads\freelance\donaldlee2008\linemod_cpp_python
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: shape-based-matching-py
  Building wheel for shape-based-matching-py (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for shape-based-matching-py (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [458 lines of output]
      running bdist_wheel
      running build
      running build_ext
      <string>:28: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
      -- Building for: Visual Studio 17 2022
      CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
        Compatibility with CMake < 3.5 will be removed from a future version of
        CMake.

        Update the VERSION argument <min> value or use a ...<max> suffix to tell
        CMake that the project does not need compatibility with older versions.


      -- The C compiler identification is MSVC 19.37.32824.0
      -- The CXX compiler identification is MSVC 19.37.32824.0
      -- Detecting C compiler ABI info
      -- Detecting C compiler ABI info - done
      -- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.37.32822/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/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.37.32822/bin/Hostx64/x64/cl.exe - skipped
      -- Detecting CXX compile features
      -- Detecting CXX compile features - done
      -- OpenCV ARCH: x64
      -- OpenCV RUNTIME: vc15
      -- OpenCV STATIC: OFF
      -- Found OpenCV: C:/Users/princ/Downloads/open-cv/2/opencv/build (found suitable version "3.4.16", minimum required is "3")
      -- Found OpenCV 3.4.16 in C:/Users/princ/Downloads/open-cv/2/opencv/build/x64/vc15/lib
      -- You might need to add C:\Users\princ\Downloads\open-cv\2\opencv\build\x64\vc15\bin to your PATH to be able to run your applications.
      CMake Warning (dev) at CMakeLists.txt:46 (find_package):
        Policy CMP0148 is not set: The FindPythonInterp and FindPythonLibs modules
        are removed.  Run "cmake --help-policy CMP0148" for policy details.  Use
        the cmake_policy command to set the policy and suppress this warning.

      This warning is for project developers.  Use -Wno-dev to suppress it.

      -- Found PythonLibs: optimized;C:/Program Files/Python39/libs/python39.lib;debug;C:/Program Files/Python39/libs/python39_d.lib (found suitable version "3.9.10", minimum required is "3")
      CMake Warning (dev) at env/Lib/site-packages/pybind11/share/cmake/pybind11/pybind11Common.cmake:102 (if):
        Policy CMP0054 is not set: Only interpret if() arguments as variables or
        keywords when unquoted.  Run "cmake --help-policy CMP0054" for policy
        details.  Use the cmake_policy command to set the policy and suppress this
        warning.

        Quoted variables like "MSVC" will no longer be dereferenced when the policy
        is set to NEW.  Since the policy is not set the OLD behavior will be used.
      Call Stack (most recent call first):
        env/Lib/site-packages/pybind11/share/cmake/pybind11/pybind11Config.cmake:250 (include)
        CMakeLists.txt:48 (find_package)
      This warning is for project developers.  Use -Wno-dev to suppress it.

      CMake Warning (dev) at env/Lib/site-packages/pybind11/share/cmake/pybind11/FindPythonLibsNew.cmake:98 (find_package):
        Policy CMP0148 is not set: The FindPythonInterp and FindPythonLibs modules
        are removed.  Run "cmake --help-policy CMP0148" for policy details.  Use
        the cmake_policy command to set the policy and suppress this warning.

      Call Stack (most recent call first):
        env/Lib/site-packages/pybind11/share/cmake/pybind11/pybind11Tools.cmake:50 (find_package)
        env/Lib/site-packages/pybind11/share/cmake/pybind11/pybind11Common.cmake:188 (include)
        env/Lib/site-packages/pybind11/share/cmake/pybind11/pybind11Config.cmake:250 (include)
        CMakeLists.txt:48 (find_package)
      This warning is for project developers.  Use -Wno-dev to suppress it.

      -- Found PythonInterp: C:/Users/princ/Downloads/freelance/donaldlee2008/linemod_cpp_python/env/Scripts/python.exe (found suitable version "3.9.10", minimum required is "3.6")
      -- Found PythonLibs: optimized;C:/Program Files/Python39/libs/python39.lib;debug;C:/Program Files/Python39/libs/python39_d.lib
      -- Performing Test HAS_MSVC_GL_LTCG
      -- Performing Test HAS_MSVC_GL_LTCG - Failed
      -- Found pybind11: C:/Users/princ/Downloads/freelance/donaldlee2008/linemod_cpp_python/env/Lib/site-packages/pybind11/include (found version "2.11.1")
      CMake Warning (dev) at pybind11/Cmake/FindNumPy.cmake:12 (INCLUDE):
        Policy CMP0148 is not set: The FindPythonInterp and FindPythonLibs modules
        are removed.  Run "cmake --help-policy CMP0148" for policy details.  Use
        the cmake_policy command to set the policy and suppress this warning.

      Call Stack (most recent call first):
        CMakeLists.txt:49 (include)
      This warning is for project developers.  Use -Wno-dev to suppress it.

      -- Found PythonInterp: C:/Users/princ/Downloads/freelance/donaldlee2008/linemod_cpp_python/env/Scripts/python.exe (found version "3.9.10")
      -- Numpy headers found
      -- Configuring done (10.8s)
      CMake Warning:
        Value of PYTHON_NUMPY_INCLUDE_DIR contained a newline; truncating


      -- Generating done (0.0s)
      CMake Warning:
        Value of PYTHON_NUMPY_INCLUDE_DIR contained a newline; truncating


      -- Build files have been written to: C:/Users/princ/Downloads/freelance/donaldlee2008/linemod_cpp_python/build/temp.win-amd64-cpython-39/Release
      MSBuild version 17.7.2+d6990bcfa for .NET Framework

        1>Checking Build System
....
...
....
cl : command line  warning D9027: source file 'literal /nologo /Wall /WX- /diagnostics:column /MP /O2 /D _WINDLL /D _MBCS /D VERSION_INFO="0.0.1" /D CMAKE_INTDIR="Release" /D shape_based_matching_py_EXPORTS /Gm- /MD /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /std:c++14 /Foshape_based_matching_py.dir\Release\ /Fdshape_based_matching_py.dir\Release\vc143.pdb /external:W0 /Gd /TP /errorReport:queue  /external:I C:/Users/princ/Downloads/open-cv/2/opencv/build/include /external:I C:/Users/princ/Downloads/open-cv/2/opencv/build/include/opencv /external:I C:/Program' ignored [C:\Users\princ\Downloads\freelance\donaldlee2008\linemod_cpp_python\build\temp.win-amd64-cpython-39\Release\shape_based_matching_py.vcxproj]
      Traceback (most recent call last):
        File "C:\Users\princ\Downloads\freelance\donaldlee2008\linemod_cpp_python\env\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
          main()
        File "C:\Users\princ\Downloads\freelance\donaldlee2008\linemod_cpp_python\env\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "C:\Users\princ\Downloads\freelance\donaldlee2008\linemod_cpp_python\env\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 251, in build_wheel
          return _build_backend().build_wheel(wheel_directory, config_settings,
        File "C:\Users\princ\AppData\Local\Temp\pip-build-env-bdp032a5\overlay\Lib\site-packages\setuptools\build_meta.py", line 434, in build_wheel
          return self._build_with_temp_dir(
        File "C:\Users\princ\AppData\Local\Temp\pip-build-env-bdp032a5\overlay\Lib\site-packages\setuptools\build_meta.py", line 419, in _build_with_temp_dir
          self.run_setup()
        File "C:\Users\princ\AppData\Local\Temp\pip-build-env-bdp032a5\overlay\Lib\site-packages\setuptools\build_meta.py", line 507, in run_setup
          super(_BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script)
        File "C:\Users\princ\AppData\Local\Temp\pip-build-env-bdp032a5\overlay\Lib\site-packages\setuptools\build_meta.py", line 341, in run_setup
          exec(code, locals())
        File "<string>", line 60, in <module>
        File "C:\Users\princ\AppData\Local\Temp\pip-build-env-bdp032a5\overlay\Lib\site-packages\setuptools\__init__.py", line 103, in setup
          return distutils.core.setup(**attrs)
        File "C:\Users\princ\AppData\Local\Temp\pip-build-env-bdp032a5\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 185, in setup
          return run_commands(dist)
        File "C:\Users\princ\AppData\Local\Temp\pip-build-env-bdp032a5\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 201, in run_commands
          dist.run_commands()
        File "C:\Users\princ\AppData\Local\Temp\pip-build-env-bdp032a5\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 969, in run_commands
          self.run_command(cmd)
        File "C:\Users\princ\AppData\Local\Temp\pip-build-env-bdp032a5\overlay\Lib\site-packages\setuptools\dist.py", line 989, in run_command
          super().run_command(command)
        File "C:\Users\princ\AppData\Local\Temp\pip-build-env-bdp032a5\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
          cmd_obj.run()
        File "C:\Users\princ\AppData\Local\Temp\pip-build-env-bdp032a5\overlay\Lib\site-packages\wheel\bdist_wheel.py", line 364, in run
          self.run_command("build")
        File "C:\Users\princ\AppData\Local\Temp\pip-build-env-bdp032a5\overlay\Lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command
          self.distribution.run_command(command)
        File "C:\Users\princ\AppData\Local\Temp\pip-build-env-bdp032a5\overlay\Lib\site-packages\setuptools\dist.py", line 989, in run_command
          super().run_command(command)
        File "C:\Users\princ\AppData\Local\Temp\pip-build-env-bdp032a5\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
          cmd_obj.run()
        File "C:\Users\princ\AppData\Local\Temp\pip-build-env-bdp032a5\overlay\Lib\site-packages\setuptools\_distutils\command\build.py", line 131, in run
          self.run_command(cmd_name)
        File "C:\Users\princ\AppData\Local\Temp\pip-build-env-bdp032a5\overlay\Lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command
          self.distribution.run_command(command)
        File "C:\Users\princ\AppData\Local\Temp\pip-build-env-bdp032a5\overlay\Lib\site-packages\setuptools\dist.py", line 989, in run_command
          super().run_command(command)
        File "C:\Users\princ\AppData\Local\Temp\pip-build-env-bdp032a5\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
          cmd_obj.run()
        File "<string>", line 33, in run
        File "<string>", line 58, in build_extension
        File "C:\Program Files\Python39\lib\subprocess.py", line 373, in check_call
          raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release', '--', '/m']' returned non-zero exit status 1.
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for shape-based-matching-py
Failed to build shape-based-matching-py
ERROR: Could not build wheels for shape-based-matching-py, which is required to install pyproject.toml-based projects

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions