Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ubuntu20.04 successfully installed colmap, but pycolmap failed to install #207

Closed
HZY12345 opened this issue Dec 11, 2023 · 3 comments
Closed

Comments

@HZY12345
Copy link

When I run pip install in my virtual environment, I get the following error:

(featurebooster) nvidia@tegra-ubuntu:~/pycolmap$ pip install .
Defaulting to user installation because normal site-packages is not writeable
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Processing /home/nvidia/pycolmap
Preparing metadata (setup.py) ... done
Building wheels for collected packages: pycolmap
Building wheel for pycolmap (setup.py) ... error
error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [140 lines of output]
running bdist_wheel
running build
running build_ext
['cmake', '/home/nvidia/pycolmap', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/home/nvidia/pycolmap/build/lib.linux-aarch64-3.8', '-DPYTHON_EXECUTABLE=/usr/bin/python3', '-DVERSION_INFO=0.4.0', '-DCMAKE_BUILD_TYPE=Release']
-- The C compiler identification is GNU 9.4.0
-- The CXX compiler identification is GNU 9.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Boost: /usr/lib/aarch64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found version "1.71.0") found components: program_options filesystem graph system
-- Found FreeImage
-- Includes : /usr/include
-- Libraries : /usr/lib/aarch64-linux-gnu/libfreeimage.so
-- Found FLANN
-- Includes : /usr/include
-- Libraries : /usr/lib/aarch64-linux-gnu/libflann.so
-- Found LZ4
-- Includes : /usr/include
-- Libraries : /usr/lib/aarch64-linux-gnu/liblz4.so
-- Found Metis
-- Includes : /usr/include
-- Libraries : /usr/lib/aarch64-linux-gnu/libmetis.so
-- Found Glog
-- Includes : /usr/include
-- Libraries : /usr/lib/aarch64-linux-gnu/libglog.so
-- Found SQLite3: /usr/include (found version "3.31.1")
-- Found OpenGL: /usr/lib/aarch64-linux-gnu/libOpenGL.so
-- Found Glew
-- Includes : /usr/include
-- Libraries : /usr/lib/aarch64-linux-gnu/libGLEW.so
-- Found Git: /usr/bin/git (found version "2.25.1")
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found required Ceres dependency: Eigen version 3.3.7 in /home/nvidia/anaconda3/envs/featurebooster/include/eigen3
-- Found required Ceres dependency: glog
-- Found required Ceres dependency: gflags
-- Found Ceres version: 2.0.0 installed in: /usr/local with components: [EigenSparse, SparseLinearAlgebraLibrary, LAPACK, SuiteSparse, CXSparse, SchurSpecializations, Multithreading]
-- Enabling OpenMP support
-- Using header-only CGAL
-- Targetting Unix Makefiles
-- Using /usr/bin/c++ compiler.
-- Found GMP: /usr/lib/aarch64-linux-gnu/libgmp.so
-- Found MPFR: /usr/lib/aarch64-linux-gnu/libmpfr.so
-- Found Boost: /usr/lib/aarch64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found suitable version "1.71.0", minimum required is "1.48")
-- Boost include dirs: /usr/include
-- Boost libraries:
-- Using gcc version 4 or later. Adding -frounding-math
-- Found CGAL
-- Includes : /usr/include
-- Libraries : CGAL
-- Found CUDA version 11.4 installed in /usr/local/cuda-11.4 via legacy CMake (<3.17) module. Using the legacy CMake module means that any installation of COLMAP will require that the CUDA libraries are available under LD_LIBRARY_PATH.
-- Found CUDA
-- Includes : /usr/local/cuda-11.4/include
-- Libraries : /usr/local/cuda-11.4/lib64/libcudart_static.a;-lpthread;dl;/usr/lib/aarch64-linux-gnu/librt.so
-- The CUDA compiler identification is NVIDIA 11.4.239
-- Check for working CUDA compiler: /usr/local/cuda-11.4/bin/nvcc
-- Check for working CUDA compiler: /usr/local/cuda-11.4/bin/nvcc -- works
-- Detecting CUDA compiler ABI info
-- Detecting CUDA compiler ABI info - done
-- Enabling CUDA support (version: 11.4, archs: native)
-- Found Qt
-- Module : /home/nvidia/anaconda3/envs/featurebooster/lib/cmake/Qt5Core
-- Module : /home/nvidia/anaconda3/envs/featurebooster/lib/cmake/Qt5OpenGL
-- Module : /home/nvidia/anaconda3/envs/featurebooster/lib/cmake/Qt5Widgets
-- Enabling GUI support
-- Disabling OpenGL support
-- Enabling GPU support
-- pybind11 v2.8.1
-- Found PythonInterp: /usr/bin/python3 (found version "3.8.10")
-- Found PythonLibs: /usr/lib/aarch64-linux-gnu/libpython3.8.so
-- Performing Test HAS_FLTO
-- Performing Test HAS_FLTO - Success
Compiling bindings without CUDA support.
Compiling bindings without CGAL support.
-- Configuring done
-- Generating done
CMake Warning:
Manually-specified variables were not used by the project:

      VERSION_INFO
  
  
  -- Build files have been written to: /home/nvidia/pycolmap/build/temp.linux-aarch64-3.8
  Scanning dependencies of target pycolmap
  [ 50%] Building CXX object CMakeFiles/pycolmap.dir/main.cc.o
  /home/nvidia/pycolmap/main.cc:7:10: fatal error: colmap/base/pose.h: No such file or directory
      7 | #include <colmap/base/pose.h>
        |          ^~~~~~~~~~~~~~~~~~~~
  compilation terminated.
  make[2]: *** [CMakeFiles/pycolmap.dir/build.make:63: CMakeFiles/pycolmap.dir/main.cc.o] Error 1
  make[1]: *** [CMakeFiles/Makefile2:96: CMakeFiles/pycolmap.dir/all] Error 2
  make: *** [Makefile:84: all] Error 2
  Traceback (most recent call last):
    File "<string>", line 2, in <module>
    File "<pip-setuptools-caller>", line 34, in <module>
    File "/home/nvidia/pycolmap/setup.py", line 83, in <module>
      setup(
    File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 144, in setup
      return distutils.core.setup(**attrs)
    File "/usr/lib/python3.8/distutils/core.py", line 148, in setup
      dist.run_commands()
    File "/usr/lib/python3.8/distutils/dist.py", line 966, in run_commands
      self.run_command(cmd)
    File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/usr/lib/python3/dist-packages/wheel/bdist_wheel.py", line 223, in run
      self.run_command('build')
    File "/usr/lib/python3.8/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/usr/lib/python3.8/distutils/command/build.py", line 135, in run
      self.run_command(cmd_name)
    File "/usr/lib/python3.8/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/home/nvidia/pycolmap/setup.py", line 35, in run
      self.build_extension(ext)
    File "/home/nvidia/pycolmap/setup.py", line 78, in build_extension
      subprocess.check_call(['cmake', '--build', '.'] + build_args, cwd=self.build_temp)
    File "/usr/lib/python3.8/subprocess.py", line 364, in check_call
      raise CalledProcessError(retcode, cmd)
  subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release', '--', '-j2']' returned non-zero exit status 2.
  [end of output]

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

@sarlinpe
Copy link
Collaborator

Was COLMAP correctly installed? with what commit hash?

@HZY12345
Copy link
Author

Was COLMAP correctly installed? with what commit hash?

Yes, I installed colmap according to the tutorial on the official website, and after the installation was completed, I started colmap-h && colmap gui started successfully.

@sarlinpe
Copy link
Collaborator

sarlinpe commented Jan 4, 2024

As the README mentions: the stable version is PyCOLMAP v0.4.0 with COLMAP 3.8. PyCOLMAP's HEAD tracks COLMAP's HEAD now.

@sarlinpe sarlinpe closed this as completed Jan 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants