cvg / pixel-perfect-sfm

Pixel-Perfect Structure-from-Motion with Featuremetric Refinement (ICCV 2021, Best Student Paper Award)
Apache License 2.0
1.33k stars 135 forks source link

subprocess-exited-with-error #129

Open junfish opened 10 months ago

junfish commented 10 months ago

Has anyone else experienced the following errors while attempting to install pixel-perfect-SfM on a macOS machine with an M2 chip? The problem seems to be the different pip versions, and I tried other versions but failed.

(py38) jasonyu@dyn247155 pixel-perfect-sfm % pip install -e . 
Obtaining file:///Users/jasonyu/pixel-perfect-sfm
  Preparing metadata (setup.py) ... done
Installing collected packages: pixsfm
  Running setup.py develop for pixsfm
    error: subprocess-exited-with-error
    × python setup.py develop did not run successfully.
    │ exit code: 1
    ╰─> [138 lines of output]
        running develop
        running egg_info
        writing pixsfm.egg-info/PKG-INFO
        writing dependency_links to pixsfm.egg-info/dependency_links.txt
        writing top-level names to pixsfm.egg-info/top_level.txt
        reading manifest file 'pixsfm.egg-info/SOURCES.txt'
        adding license file 'LICENSE'
        writing manifest file 'pixsfm.egg-info/SOURCES.txt'
        running build_ext
        CMake Deprecation Warning at CMakeLists.txt:2 (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.

        -- Found METIS: /opt/homebrew/include (found suitable version "5.1.0", minimum required is "5.1.0")
        -- Found AMD headers in: /opt/homebrew/include
        -- Found AMD library: /opt/homebrew/lib/libamd.dylib
        -- Found CAMD headers in: /opt/homebrew/include
        -- Found CAMD library: /opt/homebrew/lib/libcamd.dylib
        -- Found CCOLAMD headers in: /opt/homebrew/include
        -- Found CCOLAMD library: /opt/homebrew/lib/libccolamd.dylib
        -- Found CHOLMOD headers in: /opt/homebrew/include
        -- Found CHOLMOD library: /opt/homebrew/lib/libcholmod.dylib
        -- Found COLAMD headers in: /opt/homebrew/include
        -- Found COLAMD library: /opt/homebrew/lib/libcolamd.dylib
        -- Found SPQR headers in: /opt/homebrew/include
        -- Found SPQR library: /opt/homebrew/lib/libspqr.dylib
        -- Found Config headers in: /opt/homebrew/include
        -- Found Config library: /opt/homebrew/lib/libsuitesparseconfig.dylib
        -- Found Intel Thread Building Blocks (TBB) library (2021.10 / ) include location: . Assuming SuiteSparseQR was compiled with TBB.
        -- Could not find librt, but found SuiteSparse_config, assuming that SuiteSparse was compiled without timing.
        -- Found METIS: /opt/homebrew/include (found version "5.1.0")
        -- Found required Ceres dependency: Eigen version 3.4.0 in /Users/jasonyu/anaconda3/envs/py38/share/eigen3/cmake
        -- Found required Ceres dependency: glog
        -- Found required Ceres dependency: gflags
        -- Found Ceres version: 2.2.0 installed in: /Users/jasonyu/anaconda3/envs/py38 with components: [EigenSparse, SparseLinearAlgebraLibrary, LAPACK, SuiteSparse, SchurSpecializations]
        -- Found Eigen
        --   Includes : /opt/homebrew/include/eigen3
        -- Found FLANN
        --   Includes : /opt/homebrew/include
        --   Libraries : /opt/homebrew/lib/libflann.dylib
        -- Found LZ4
        --   Includes : /opt/homebrew/include
        --   Libraries : /opt/homebrew/lib/liblz4.dylib
        -- Found FreeImage
        --   Includes : /opt/homebrew/include
        --   Libraries : /opt/homebrew/lib/libfreeimage.dylib
        -- Found Glog
        --   Includes : /opt/homebrew/include
        --   Libraries : /opt/homebrew/lib/libglog.dylib
        -- Found SQLite3
        --   Includes : /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include
        --   Libraries : /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/lib/libsqlite3.tbd
        -- Found Glew
        --   Includes : /opt/homebrew/include
        --   Libraries : /opt/homebrew/lib/libGLEW.dylib
        CMake Error at /opt/homebrew/Cellar/cmake/3.27.8/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
          Could NOT find VLFEAT (missing: VLFEAT_LIBRARY VLFEAT_INCLUDE_DIR)
        Call Stack (most recent call first):
          /opt/homebrew/Cellar/cmake/3.27.8/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
          /Users/jasonyu/anaconda3/envs/py38/share/colmap/cmake/FindVLFEAT.cmake:33 (find_package_handle_standard_args)
          /Users/jasonyu/anaconda3/envs/py38/share/colmap/COLMAPConfig.cmake:131 (find_package)
          CMakeLists.txt:32 (find_package)

        CMake Error at CMakeLists.txt:32 (find_package):
          Found package configuration file:

            /Users/jasonyu/anaconda3/envs/py38/share/colmap/COLMAPConfig.cmake

          but it set COLMAP_FOUND to FALSE so package "COLMAP" is considered to be
          NOT FOUND.

        -- Configuring incomplete, errors occurred!
        /Users/jasonyu/anaconda3/envs/py38/lib/python3.8/site-packages/setuptools/command/develop.py:40: EasyInstallDeprecationWarning: easy_install command is deprecated.
        !!

                ********************************************************************************
                Please avoid running ``setup.py`` and ``easy_install``.
                Instead, use pypa/build, pypa/installer or other
                standards-based tools.

                See https://github.com/pypa/setuptools/issues/917 for details.
                ********************************************************************************

        !!
          easy_install.initialize_options(self)
        /Users/jasonyu/anaconda3/envs/py38/lib/python3.8/site-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.
        !!

                ********************************************************************************
                Please avoid running ``setup.py`` directly.
                Instead, use pypa/build, pypa/installer or other
                standards-based tools.

                See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
                ********************************************************************************

        !!
          self.initialize_options()
        Traceback (most recent call last):
          File "<string>", line 2, in <module>
          File "<pip-setuptools-caller>", line 34, in <module>
          File "/Users/jasonyu/pixel-perfect-sfm/setup.py", line 112, in <module>
            setup(
          File "/Users/jasonyu/anaconda3/envs/py38/lib/python3.8/site-packages/setuptools/__init__.py", line 107, in setup
            return distutils.core.setup(**attrs)
          File "/Users/jasonyu/anaconda3/envs/py38/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 185, in setup
            return run_commands(dist)
          File "/Users/jasonyu/anaconda3/envs/py38/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
            dist.run_commands()
          File "/Users/jasonyu/anaconda3/envs/py38/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
            self.run_command(cmd)
          File "/Users/jasonyu/anaconda3/envs/py38/lib/python3.8/site-packages/setuptools/dist.py", line 1234, in run_command
            super().run_command(command)
          File "/Users/jasonyu/anaconda3/envs/py38/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
            cmd_obj.run()
          File "/Users/jasonyu/anaconda3/envs/py38/lib/python3.8/site-packages/setuptools/command/develop.py", line 34, in run
            self.install_for_development()
          File "/Users/jasonyu/anaconda3/envs/py38/lib/python3.8/site-packages/setuptools/command/develop.py", line 111, in install_for_development
            self.run_command('build_ext')
          File "/Users/jasonyu/anaconda3/envs/py38/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
            self.distribution.run_command(command)
          File "/Users/jasonyu/anaconda3/envs/py38/lib/python3.8/site-packages/setuptools/dist.py", line 1234, in run_command
            super().run_command(command)
          File "/Users/jasonyu/anaconda3/envs/py38/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
            cmd_obj.run()
          File "/Users/jasonyu/pixel-perfect-sfm/setup.py", line 55, in run
            self.build_extension(ext)
          File "/Users/jasonyu/pixel-perfect-sfm/setup.py", line 96, in build_extension
            subprocess.check_call(['cmake', ext.sourcedir] + cmake_args,
          File "/Users/jasonyu/anaconda3/envs/py38/lib/python3.8/subprocess.py", line 364, in check_call
            raise CalledProcessError(retcode, cmd)
        subprocess.CalledProcessError: Command '['cmake', '/Users/jasonyu/pixel-perfect-sfm', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/Users/jasonyu/pixel-perfect-sfm/pixsfm', '-DPYTHON_EXECUTABLE=/Users/jasonyu/anaconda3/envs/py38/bin/python', '-DTESTS_ENABLED=OFF', '-DCMAKE_BUILD_TYPE=Release']' 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: subprocess-exited-with-error

× python setup.py develop did not run successfully.
│ exit code: 1
╰─> [138 lines of output]
    running develop
    running egg_info
    writing pixsfm.egg-info/PKG-INFO
    writing dependency_links to pixsfm.egg-info/dependency_links.txt
    writing top-level names to pixsfm.egg-info/top_level.txt
    reading manifest file 'pixsfm.egg-info/SOURCES.txt'
    adding license file 'LICENSE'
    writing manifest file 'pixsfm.egg-info/SOURCES.txt'
    running build_ext
    CMake Deprecation Warning at CMakeLists.txt:2 (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.

    -- Found METIS: /opt/homebrew/include (found suitable version "5.1.0", minimum required is "5.1.0")
    -- Found AMD headers in: /opt/homebrew/include
    -- Found AMD library: /opt/homebrew/lib/libamd.dylib
    -- Found CAMD headers in: /opt/homebrew/include
    -- Found CAMD library: /opt/homebrew/lib/libcamd.dylib
    -- Found CCOLAMD headers in: /opt/homebrew/include
    -- Found CCOLAMD library: /opt/homebrew/lib/libccolamd.dylib
    -- Found CHOLMOD headers in: /opt/homebrew/include
    -- Found CHOLMOD library: /opt/homebrew/lib/libcholmod.dylib
    -- Found COLAMD headers in: /opt/homebrew/include
    -- Found COLAMD library: /opt/homebrew/lib/libcolamd.dylib
    -- Found SPQR headers in: /opt/homebrew/include
    -- Found SPQR library: /opt/homebrew/lib/libspqr.dylib
    -- Found Config headers in: /opt/homebrew/include
    -- Found Config library: /opt/homebrew/lib/libsuitesparseconfig.dylib
    -- Found Intel Thread Building Blocks (TBB) library (2021.10 / ) include location: . Assuming SuiteSparseQR was compiled with TBB.
    -- Could not find librt, but found SuiteSparse_config, assuming that SuiteSparse was compiled without timing.
    -- Found METIS: /opt/homebrew/include (found version "5.1.0")
    -- Found required Ceres dependency: Eigen version 3.4.0 in /Users/jasonyu/anaconda3/envs/py38/share/eigen3/cmake
    -- Found required Ceres dependency: glog
    -- Found required Ceres dependency: gflags
    -- Found Ceres version: 2.2.0 installed in: /Users/jasonyu/anaconda3/envs/py38 with components: [EigenSparse, SparseLinearAlgebraLibrary, LAPACK, SuiteSparse, SchurSpecializations]
    -- Found Eigen
    --   Includes : /opt/homebrew/include/eigen3
    -- Found FLANN
    --   Includes : /opt/homebrew/include
    --   Libraries : /opt/homebrew/lib/libflann.dylib
    -- Found LZ4
    --   Includes : /opt/homebrew/include
    --   Libraries : /opt/homebrew/lib/liblz4.dylib
    -- Found FreeImage
    --   Includes : /opt/homebrew/include
    --   Libraries : /opt/homebrew/lib/libfreeimage.dylib
    -- Found Glog
    --   Includes : /opt/homebrew/include
    --   Libraries : /opt/homebrew/lib/libglog.dylib
    -- Found SQLite3
    --   Includes : /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include
    --   Libraries : /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/lib/libsqlite3.tbd
    -- Found Glew
    --   Includes : /opt/homebrew/include
    --   Libraries : /opt/homebrew/lib/libGLEW.dylib
    CMake Error at /opt/homebrew/Cellar/cmake/3.27.8/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
      Could NOT find VLFEAT (missing: VLFEAT_LIBRARY VLFEAT_INCLUDE_DIR)
    Call Stack (most recent call first):
      /opt/homebrew/Cellar/cmake/3.27.8/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
      /Users/jasonyu/anaconda3/envs/py38/share/colmap/cmake/FindVLFEAT.cmake:33 (find_package_handle_standard_args)
      /Users/jasonyu/anaconda3/envs/py38/share/colmap/COLMAPConfig.cmake:131 (find_package)
      CMakeLists.txt:32 (find_package)

    CMake Error at CMakeLists.txt:32 (find_package):
      Found package configuration file:

        /Users/jasonyu/anaconda3/envs/py38/share/colmap/COLMAPConfig.cmake

      but it set COLMAP_FOUND to FALSE so package "COLMAP" is considered to be
      NOT FOUND.

    -- Configuring incomplete, errors occurred!
    /Users/jasonyu/anaconda3/envs/py38/lib/python3.8/site-packages/setuptools/command/develop.py:40: EasyInstallDeprecationWarning: easy_install command is deprecated.
    !!

            ********************************************************************************
            Please avoid running ``setup.py`` and ``easy_install``.
            Instead, use pypa/build, pypa/installer or other
            standards-based tools.

            See https://github.com/pypa/setuptools/issues/917 for details.
            ********************************************************************************

    !!
      easy_install.initialize_options(self)
    /Users/jasonyu/anaconda3/envs/py38/lib/python3.8/site-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.
    !!

            ********************************************************************************
            Please avoid running ``setup.py`` directly.
            Instead, use pypa/build, pypa/installer or other
            standards-based tools.

            See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
            ********************************************************************************

    !!
      self.initialize_options()
    Traceback (most recent call last):
      File "<string>", line 2, in <module>
      File "<pip-setuptools-caller>", line 34, in <module>
      File "/Users/jasonyu/pixel-perfect-sfm/setup.py", line 112, in <module>
        setup(
      File "/Users/jasonyu/anaconda3/envs/py38/lib/python3.8/site-packages/setuptools/__init__.py", line 107, in setup
        return distutils.core.setup(**attrs)
      File "/Users/jasonyu/anaconda3/envs/py38/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 185, in setup
        return run_commands(dist)
      File "/Users/jasonyu/anaconda3/envs/py38/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
        dist.run_commands()
      File "/Users/jasonyu/anaconda3/envs/py38/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
        self.run_command(cmd)
      File "/Users/jasonyu/anaconda3/envs/py38/lib/python3.8/site-packages/setuptools/dist.py", line 1234, in run_command
        super().run_command(command)
      File "/Users/jasonyu/anaconda3/envs/py38/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
        cmd_obj.run()
      File "/Users/jasonyu/anaconda3/envs/py38/lib/python3.8/site-packages/setuptools/command/develop.py", line 34, in run
        self.install_for_development()
      File "/Users/jasonyu/anaconda3/envs/py38/lib/python3.8/site-packages/setuptools/command/develop.py", line 111, in install_for_development
        self.run_command('build_ext')
      File "/Users/jasonyu/anaconda3/envs/py38/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
        self.distribution.run_command(command)
      File "/Users/jasonyu/anaconda3/envs/py38/lib/python3.8/site-packages/setuptools/dist.py", line 1234, in run_command
        super().run_command(command)
      File "/Users/jasonyu/anaconda3/envs/py38/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
        cmd_obj.run()
      File "/Users/jasonyu/pixel-perfect-sfm/setup.py", line 55, in run
        self.build_extension(ext)
      File "/Users/jasonyu/pixel-perfect-sfm/setup.py", line 96, in build_extension
        subprocess.check_call(['cmake', ext.sourcedir] + cmake_args,
      File "/Users/jasonyu/anaconda3/envs/py38/lib/python3.8/subprocess.py", line 364, in check_call
        raise CalledProcessError(retcode, cmd)
    subprocess.CalledProcessError: Command '['cmake', '/Users/jasonyu/pixel-perfect-sfm', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/Users/jasonyu/pixel-perfect-sfm/pixsfm', '-DPYTHON_EXECUTABLE=/Users/jasonyu/anaconda3/envs/py38/bin/python', '-DTESTS_ENABLED=OFF', '-DCMAKE_BUILD_TYPE=Release']' returned non-zero exit status 1.
    [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
junfish commented 10 months ago

Clues: I successfully installed colmap-3.8 and pycolmap but unsuccessfully installed pyceres.

yh-pengtu commented 9 months ago

@junfish Sorry, I met the same error as you. Have u solved this problem?

cmburgul commented 9 months ago

@junfish @yh-pengtu I met the same error. Did you get the fix?

yh-pengtu commented 9 months ago

@cmburgul In my case, this error was caused by different versions of ceres-solver.