pycolmap icon indicating copy to clipboard operation
pycolmap copied to clipboard

Windows10 install pycolmap error: " Could not find a package configuration file provided by "COLMAP" with any of the following names: COLMAPConfig.cmake colmap-config.cmake"

Open ZZWang21 opened this issue 2 years ago • 4 comments

I have installed COLMAP according to the instruction. When I tried to install pycolmap. The errors came:

" ERROR: Command errored out with exit status 1: command: 'C:\Users\walterz\anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\walterz\AppData\Local\Temp\pip-req-build-epttgyhw\setup.py'"'"'; file='"'"'C:\Users\walterz\AppData\Local\Temp\pip-req-build-epttgyhw\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\walterz\AppData\Local\Temp\pip-wheel-bsm0f304' cwd: C:\Users\walterz\AppData\Local\Temp\pip-req-build-epttgyhw
Complete output (70 lines): running bdist_wheel running build running build_ext -- Building for: Visual Studio 15 2017 -- Selecting Windows SDK version 10.0.17134.0 to target Windows 10.0.19042. -- The C compiler identification is MSVC 19.15.26726.0 -- The CXX compiler identification is MSVC 19.15.26726.0 -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.15.26726/bin/Hostx86/x64/cl.exe -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.15.26726/bin/Hostx86/x64/cl.exe -- 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: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.15.26726/bin/Hostx86/x64/cl.exe -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.15.26726/bin/Hostx86/x64/cl.exe -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done CMake Error at CMakeLists.txt:4 (find_package): By not providing "FindCOLMAP.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "COLMAP", but CMake did not find one.

Could not find a package configuration file provided by "COLMAP" with any
of the following names:

  COLMAPConfig.cmake
  colmap-config.cmake

Add the installation prefix of "COLMAP" to CMAKE_PREFIX_PATH or set
"COLMAP_DIR" to a directory containing one of the above files.  If "COLMAP"
provides a separate development package or SDK, be sure it has been
installed.

-- Configuring incomplete, errors occurred! See also "C:/Users/walterz/AppData/Local/Temp/pip-req-build-epttgyhw/build/temp.win-amd64-3.8/Release/CMakeFiles/CMakeOutput.log". Traceback (most recent call last): File "", line 1, in File "C:\Users\walterz\AppData\Local\Temp\pip-req-build-epttgyhw\setup.py", line 80, in setup( File "C:\Users\walterz\anaconda3\lib\site-packages\setuptools_init_.py", line 153, in setup return distutils.core.setup(**attrs) File "C:\Users\walterz\anaconda3\lib\distutils\core.py", line 148, in setup dist.run_commands() File "C:\Users\walterz\anaconda3\lib\distutils\dist.py", line 966, in run_commands self.run_command(cmd) File "C:\Users\walterz\anaconda3\lib\distutils\dist.py", line 985, in run_command cmd_obj.run() File "C:\Users\walterz\anaconda3\lib\site-packages\wheel\bdist_wheel.py", line 299, in run self.run_command('build') File "C:\Users\walterz\anaconda3\lib\distutils\cmd.py", line 313, in run_command self.distribution.run_command(command) File "C:\Users\walterz\anaconda3\lib\distutils\dist.py", line 985, in run_command cmd_obj.run() File "C:\Users\walterz\anaconda3\lib\distutils\command\build.py", line 135, in run self.run_command(cmd_name) File "C:\Users\walterz\anaconda3\lib\distutils\cmd.py", line 313, in run_command self.distribution.run_command(command) File "C:\Users\walterz\anaconda3\lib\distutils\dist.py", line 985, in run_command cmd_obj.run() File "C:\Users\walterz\AppData\Local\Temp\pip-req-build-epttgyhw\setup.py", line 34, in run self.build_extension(ext) File "C:\Users\walterz\AppData\Local\Temp\pip-req-build-epttgyhw\setup.py", line 76, in build_extension subprocess.check_call(['cmake', ext.sourcedir] + cmake_args, cwd=self.build_temp, env=env) File "C:\Users\walterz\anaconda3\lib\subprocess.py", line 364, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['cmake', 'C:\Users\walterz\AppData\Local\Temp\pip-req-build-epttgyhw', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\walterz\AppData\Local\Temp\pip-req-build-epttgyhw\build\lib.win-amd64-3.8', '-DPYTHON_EXECUTABLE=C:\Users\walterz\anaconda3\python.exe', '-DVERSION_INFO=0.2.0', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\walterz\AppData\Local\Temp\pip-req-build-epttgyhw\build\lib.win-amd64-3.8', '-A', 'x64']' returned non-zero exit status 1. ['cmake', 'C:\Users\walterz\AppData\Local\Temp\pip-req-build-epttgyhw', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\walterz\AppData\Local\Temp\pip-req-build-epttgyhw\build\lib.win-amd64-3.8', '-DPYTHON_EXECUTABLE=C:\Users\walterz\anaconda3\python.exe', '-DVERSION_INFO=0.2.0', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\walterz\AppData\Local\Temp\pip-req-build-epttgyhw\build\lib.win-amd64-3.8', '-A', 'x64']

ERROR: Failed building wheel for pycolmap Running setup.py clean for pycolmap Failed to build pycolmap Installing collected packages: pycolmap Running setup.py install for pycolmap ... error ERROR: Command errored out with exit status 1: command: 'C:\Users\walterz\anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\walterz\AppData\Local\Temp\pip-req-build-epttgyhw\setup.py'"'"'; file='"'"'C:\Users\walterz\AppData\Local\Temp\pip-req-build-epttgyhw\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\walterz\AppData\Local\Temp\pip-record-e5ss5ncq\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\walterz\anaconda3\Include\pycolmap' cwd: C:\Users\walterz\AppData\Local\Temp\pip-req-build-epttgyhw
Complete output (72 lines): running install running build running build_ext -- Building for: Visual Studio 15 2017 -- Selecting Windows SDK version 10.0.17134.0 to target Windows 10.0.19042. -- The C compiler identification is MSVC 19.15.26726.0 -- The CXX compiler identification is MSVC 19.15.26726.0 -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.15.26726/bin/Hostx86/x64/cl.exe -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.15.26726/bin/Hostx86/x64/cl.exe -- 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: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.15.26726/bin/Hostx86/x64/cl.exe -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.15.26726/bin/Hostx86/x64/cl.exe -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done CMake Error at CMakeLists.txt:4 (find_package): By not providing "FindCOLMAP.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "COLMAP", but CMake did not find one.

  Could not find a package configuration file provided by "COLMAP" with any
  of the following names:

    COLMAPConfig.cmake
    colmap-config.cmake

  Add the installation prefix of "COLMAP" to CMAKE_PREFIX_PATH or set
  "COLMAP_DIR" to a directory containing one of the above files.  If "COLMAP"
  provides a separate development package or SDK, be sure it has been
  installed.


-- Configuring incomplete, errors occurred!
See also "C:/Users/walterz/AppData/Local/Temp/pip-req-build-epttgyhw/build/temp.win-amd64-3.8/Release/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\walterz\AppData\Local\Temp\pip-req-build-epttgyhw\setup.py", line 80, in <module>
    setup(
  File "C:\Users\walterz\anaconda3\lib\site-packages\setuptools\__init__.py", line 153, in setup
    return distutils.core.setup(**attrs)
  File "C:\Users\walterz\anaconda3\lib\distutils\core.py", line 148, in setup
    dist.run_commands()
  File "C:\Users\walterz\anaconda3\lib\distutils\dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "C:\Users\walterz\anaconda3\lib\distutils\dist.py", line 985, in run_command
    cmd_obj.run()
  File "C:\Users\walterz\anaconda3\lib\site-packages\setuptools\command\install.py", line 61, in run
    return orig.install.run(self)
  File "C:\Users\walterz\anaconda3\lib\distutils\command\install.py", line 545, in run
    self.run_command('build')
  File "C:\Users\walterz\anaconda3\lib\distutils\cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "C:\Users\walterz\anaconda3\lib\distutils\dist.py", line 985, in run_command
    cmd_obj.run()
  File "C:\Users\walterz\anaconda3\lib\distutils\command\build.py", line 135, in run
    self.run_command(cmd_name)
  File "C:\Users\walterz\anaconda3\lib\distutils\cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "C:\Users\walterz\anaconda3\lib\distutils\dist.py", line 985, in run_command
    cmd_obj.run()
  File "C:\Users\walterz\AppData\Local\Temp\pip-req-build-epttgyhw\setup.py", line 34, in run
    self.build_extension(ext)
  File "C:\Users\walterz\AppData\Local\Temp\pip-req-build-epttgyhw\setup.py", line 76, in build_extension
    subprocess.check_call(['cmake', ext.sourcedir] + cmake_args, cwd=self.build_temp, env=env)
  File "C:\Users\walterz\anaconda3\lib\subprocess.py", line 364, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'C:\\Users\\walterz\\AppData\\Local\\Temp\\pip-req-build-epttgyhw', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\Users\\walterz\\AppData\\Local\\Temp\\pip-req-build-epttgyhw\\build\\lib.win-amd64-3.8', '-DPYTHON_EXECUTABLE=C:\\Users\\walterz\\anaconda3\\python.exe', '-DVERSION_INFO=0.2.0', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\Users\\walterz\\AppData\\Local\\Temp\\pip-req-build-epttgyhw\\build\\lib.win-amd64-3.8', '-A', 'x64']' returned non-zero exit status 1.
['cmake', 'C:\\Users\\walterz\\AppData\\Local\\Temp\\pip-req-build-epttgyhw', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\Users\\walterz\\AppData\\Local\\Temp\\pip-req-build-epttgyhw\\build\\lib.win-amd64-3.8', '-DPYTHON_EXECUTABLE=C:\\Users\\walterz\\anaconda3\\python.exe', '-DVERSION_INFO=0.2.0', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\Users\\walterz\\AppData\\Local\\Temp\\pip-req-build-epttgyhw\\build\\lib.win-amd64-3.8', '-A', 'x64']
----------------------------------------

ERROR: Command errored out with exit status 1: 'C:\Users\walterz\anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\walterz\AppData\Local\Temp\pip-req-build-epttgyhw\setup.py'"'"'; file='"'"'C:\Users\walterz\AppData\Local\Temp\pip-req-build-epttgyhw\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\walterz\AppData\Local\Temp\pip-record-e5ss5ncq\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\walterz\anaconda3\Include\pycolmap' Check the logs for full command output. "

What is the problem? Could any expert help me? Thank you.

ZZWang21 avatar May 05 '22 07:05 ZZWang21

I tried to modify the cmakelist.txt but got " Found package configuration file: but it set COLMAP_FOUND to FALSE so package "COLMAP" is considered to be NOT FOUND."

What is the problem? Thank you.

ZZWang21 avatar May 05 '22 16:05 ZZWang21

I have never installed PyCOLMAP on Windows so I am not sure how to fix this.

Are you following the official installation instructions using VCPKG - https://github.com/colmap/pycolmap#windows?

mihaidusmanu avatar May 08 '22 07:05 mihaidusmanu

I have never installed PyCOLMAP on Windows so I am not sure how to fix this.

Are you following the official installation instructions using VCPKG - https://github.com/colmap/pycolmap#windows?

I did follow the instructions.

ZZWang21 avatar May 14 '22 08:05 ZZWang21

I have installed pycolmap on Windows11 successfully. Please double-check you have added CMAKE_TOOLCHAIN_FILE to your system environment variable.

Vincentqyw avatar Jun 19 '22 17:06 Vincentqyw