cvg / DeepLSD

Implementation of the paper "DeepLSD: Line Segment Detection and Refinement with Deep Image Gradients"
MIT License
487 stars 62 forks source link

can't install line_refinement module #43

Open supersuperdong opened 2 weeks ago

supersuperdong commented 2 weeks ago

trying to do full install following readme.txt have tried every method sonnet and gpt told but still can't install line_refinement

here's the lines printed:

root@autodl-container-5d4911a352-981ce961:~/autodl-tmp/DeepLSD# pip install -e line_refinement Looking in indexes: http://mirrors.aliyun.com/pypi/simple Obtaining file:///root/autodl-tmp/DeepLSD/line_refinement Installing collected packages: line-refinement Running setup.py develop for line-refinement ERROR: Command errored out with exit status 1: command: /root/miniconda3/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/root/autodl-tmp/DeepLSD/line_refinement/setup.py'"'"'; file='"'"'/root/autodl-tmp/DeepLSD/line_refinement/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'"'"'))' develop --no-deps cwd: /root/autodl-tmp/DeepLSD/line_refinement/ Complete output (133 lines): running develop running egg_info writing line_refinement.egg-info/PKG-INFO writing dependency_links to line_refinement.egg-info/dependency_links.txt writing top-level names to line_refinement.egg-info/top_level.txt reading manifest file 'line_refinement.egg-info/SOURCES.txt' writing manifest file 'line_refinement.egg-info/SOURCES.txt' running build_ext -- Found AMD headers in: /usr/include/suitesparse -- Found AMD library: /usr/lib/x86_64-linux-gnu/libamd.so -- Found CAMD headers in: /usr/include/suitesparse -- Found CAMD library: /usr/lib/x86_64-linux-gnu/libcamd.so -- Found CCOLAMD headers in: /usr/include/suitesparse -- Found CCOLAMD library: /usr/lib/x86_64-linux-gnu/libccolamd.so -- Found CHOLMOD headers in: /usr/include/suitesparse -- Found CHOLMOD library: /usr/lib/x86_64-linux-gnu/libcholmod.so -- Found COLAMD headers in: /usr/include/suitesparse -- Found COLAMD library: /usr/lib/x86_64-linux-gnu/libcolamd.so -- Found SPQR headers in: /usr/include/suitesparse -- Found SPQR library: /usr/lib/x86_64-linux-gnu/libspqr.so -- Found Config headers in: /usr/include/suitesparse -- Found Config library: /usr/lib/x86_64-linux-gnu/libsuitesparseconfig.so -- Found Intel Thread Building Blocks (TBB) library (2020.1 / 11101). Assuming SuiteSparseQR was compiled with TBB. -- Adding librt to SuiteSparse_config libraries (required on Linux & Unix [not OSX] if SuiteSparse is compiled with timing). -- Could NOT find METIS (missing: METIS_INCLUDE_DIR METIS_LIBRARY) -- Found required Ceres dependency: absl version 20240116 in /usr/local/lib/cmake/absl -- Found required Ceres dependency: Eigen version 3.3.7 in /usr/lib/cmake/eigen3 -- Found Ceres version: 2.3.0 installed in: /usr/local with components: [EigenSparse, SparseLinearAlgebraLibrary, LAPACK, SuiteSparse, SchurSpecializations] -- CUDA_VERSION: 11.3 -- CUDA_FOUND: TRUE -- CUDA_TOOLKIT_ROOT_DIR: /usr/local/cuda -- CUDA_INCLUDE_DIRS: /usr/local/cuda/include -- CUDA_LIBRARY: -- CUDA_CUDART_LIBRARY: /usr/local/cuda/lib64/libcudart.so -- CUDA_NVCC_EXECUTABLE: /usr/local/cuda/bin/nvcc -- CUDA_LIBRARIES: /usr/local/cuda/lib64/libcudart_static.a;-lpthread;dl;/usr/lib/x86_64-linux-gnu/librt.so -- CUDA_TOOLKIT_INCLUDE: /usr/local/cuda/include -- pybind11 v2.14.0 dev1 -- Configuring done CMake Error at pybind11/tools/pybind11Tools.cmake:158 (add_library): Target "line_refinement" links to target "CUDA::cublas" but the target was not found. Perhaps a find_package() call is missing for an IMPORTED target, or an ALIAS target is missing? Call Stack (most recent call first): CMakeLists.txt:49 (pybind11_add_module)

CMake Error at pybind11/tools/pybind11Tools.cmake:158 (add_library):
  Target "line_refinement" links to target "CUDA::cudart" but the target was
  not found.  Perhaps a find_package() call is missing for an IMPORTED
  target, or an ALIAS target is missing?
Call Stack (most recent call first):
  CMakeLists.txt:49 (pybind11_add_module)

CMake Error at pybind11/tools/pybind11Tools.cmake:158 (add_library):
  Target "line_refinement" links to target "CUDA::cusolver" but the target
  was not found.  Perhaps a find_package() call is missing for an IMPORTED
  target, or an ALIAS target is missing?
Call Stack (most recent call first):
  CMakeLists.txt:49 (pybind11_add_module)

CMake Error at pybind11/tools/pybind11Tools.cmake:158 (add_library):
  Target "line_refinement" links to target "CUDA::cusparse" but the target
  was not found.  Perhaps a find_package() call is missing for an IMPORTED
  target, or an ALIAS target is missing?
Call Stack (most recent call first):
  CMakeLists.txt:49 (pybind11_add_module)

CMake Error at pybind11/tools/pybind11Tools.cmake:158 (add_library):
  Target "line_refinement" links to target "CUDA::cublas" but the target was
  not found.  Perhaps a find_package() call is missing for an IMPORTED
  target, or an ALIAS target is missing?
Call Stack (most recent call first):
  CMakeLists.txt:49 (pybind11_add_module)

CMake Error at pybind11/tools/pybind11Tools.cmake:158 (add_library):
  Target "line_refinement" links to target "CUDA::cudart" but the target was
  not found.  Perhaps a find_package() call is missing for an IMPORTED
  target, or an ALIAS target is missing?
Call Stack (most recent call first):
  CMakeLists.txt:49 (pybind11_add_module)

CMake Error at pybind11/tools/pybind11Tools.cmake:158 (add_library):
  Target "line_refinement" links to target "CUDA::cusolver" but the target
  was not found.  Perhaps a find_package() call is missing for an IMPORTED
  target, or an ALIAS target is missing?
Call Stack (most recent call first):
  CMakeLists.txt:49 (pybind11_add_module)

CMake Error at pybind11/tools/pybind11Tools.cmake:158 (add_library):
  Target "line_refinement" links to target "CUDA::cusparse" but the target
  was not found.  Perhaps a find_package() call is missing for an IMPORTED
  target, or an ALIAS target is missing?
Call Stack (most recent call first):
  CMakeLists.txt:49 (pybind11_add_module)

-- Generating done
CMake Generate step failed.  Build files cannot be regenerated correctly.
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/root/autodl-tmp/DeepLSD/line_refinement/setup.py", line 68, in <module>
    setup(
  File "/root/miniconda3/lib/python3.8/site-packages/setuptools/__init__.py", line 153, in setup
    return distutils.core.setup(**attrs)
  File "/root/miniconda3/lib/python3.8/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/root/miniconda3/lib/python3.8/distutils/dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "/root/miniconda3/lib/python3.8/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/root/miniconda3/lib/python3.8/site-packages/setuptools/command/develop.py", line 34, in run
    self.install_for_development()
  File "/root/miniconda3/lib/python3.8/site-packages/setuptools/command/develop.py", line 136, in install_for_development
    self.run_command('build_ext')
  File "/root/miniconda3/lib/python3.8/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/root/miniconda3/lib/python3.8/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/root/autodl-tmp/DeepLSD/line_refinement/setup.py", line 36, in run
    self.build_extension(ext)
  File "/root/autodl-tmp/DeepLSD/line_refinement/setup.py", line 65, in build_extension
    subprocess.check_call(['cmake', ext.sourcedir] + cmake_args, cwd=self.build_temp, env=env)
  File "/root/miniconda3/lib/python3.8/subprocess.py", line 364, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '/root/autodl-tmp/DeepLSD/line_refinement', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/root/autodl-tmp/DeepLSD/line_refinement', '-DPYTHON_EXECUTABLE=/root/miniconda3/bin/python', '-DCMAKE_BUILD_TYPE=Release', '-DCMAKE_INSTALL_PREFIX=~/.local/']' returned non-zero exit status 1.
['cmake', '/root/autodl-tmp/DeepLSD/line_refinement', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/root/autodl-tmp/DeepLSD/line_refinement', '-DPYTHON_EXECUTABLE=/root/miniconda3/bin/python', '-DCMAKE_BUILD_TYPE=Release', '-DCMAKE_INSTALL_PREFIX=~/.local/']
----------------------------------------

ERROR: Command errored out with exit status 1: /root/miniconda3/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/root/autodl-tmp/DeepLSD/line_refinement/setup.py'"'"'; file='"'"'/root/autodl-tmp/DeepLSD/line_refinement/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'"'"'))' develop --no-deps Check the logs for full command output. root@autodl-container-5d4911a352-981ce961:~/autodl-tmp/DeepLSD# sudo apt-get install cuda-libraries-dev- bash: syntax error near unexpected token `newline' root@autodl-container-5d4911a352-981ce961:~/autodl-tmp/DeepLSD# sudo apt-get install cuda-libraries-dev-11.3 Reading package lists... Done Building dependency tree
Reading state information... Done Note, selecting 'cuda-libraries-dev-11-3' for regex 'cuda-libraries-dev-11.3' cuda-libraries-dev-11-3 is already the newest version (11.3.0-1). 0 upgraded, 0 newly installed, 0 to remove and 234 not upgraded. root@autodl-container-5d4911a352-981ce961:~/autodl-tmp/DeepLSD# cmake --version cmake version 3.16.3

CMake suite maintained and supported by Kitware (kitware.com/cmake).

is there any conflict between cmake and pybind version? or the cuda and cudatoolkits installed wrongly?