mapillary / OpenSfM

Open source Structure-from-Motion pipeline
https://www.opensfm.org/
BSD 2-Clause "Simplified" License
3.3k stars 848 forks source link

Error when building setup.py on Windows #952

Open uestcwcw opened 1 year ago

uestcwcw commented 1 year ago

Configuring for python 3.9... -- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19044. -- Using VCPKG FindLAPACK from package 'lapack-reference' -- A library with LAPACK API found. -- Using VCPKG FindLAPACK from package 'lapack-reference' -- Failed to find SuiteSparse - Did not find AMD library (required SuiteSparse component). -- Failed to find SuiteSparse - Did not find AMD header (required SuiteSparse component). -- Failed to find SuiteSparse - Did not find CAMD library (required SuiteSparse component). -- Failed to find SuiteSparse - Did not find CAMD header (required SuiteSparse component). -- Failed to find SuiteSparse - Did not find COLAMD library (required SuiteSparse component). -- Failed to find SuiteSparse - Did not find COLAMD header (required SuiteSparse component). -- Failed to find SuiteSparse - Did not find CCOLAMD library (required SuiteSparse component). -- Failed to find SuiteSparse - Did not find CCOLAMD header (required SuiteSparse component). -- Failed to find SuiteSparse - Did not find CHOLMOD library (required SuiteSparse component). -- Failed to find SuiteSparse - Did not find CHOLMOD header (required SuiteSparse component). -- Failed to find SuiteSparse - Did not find CXSPARSE library (required SuiteSparse component). -- Failed to find SuiteSparse - Did not find SuiteSparseQR library (required SuiteSparse component). -- Failed to find SuiteSparse - Did not find SUITESPARSEQR header (required SuiteSparse component). -- Found SuiteSparse_config library: D:/0-python_work/OpenSfM/vcpkg/installed/x64-windows/lib/suitesparseconfig.lib -- Failed to find SuiteSparse - Failed to find either: SuiteSparse_config header & library (should be present in all SuiteSparse >= v4 installs), or UFconfig header (should be present in all SuiteSparse < v4 installs). -- Found METIS library: D:/0-python_work/OpenSfM/vcpkg/installed/x64-windows/debug/lib/metis.lib. -- Failed to find some/all required components of SuiteSparse. (missing: AMD_FOUND CAMD_FOUND COLAMD_FOUND CCOLAMD_FOUND CHOLMOD_FOUND CXSPARSE_FOUND SUITESPARSEQR_FOUND SUITESPARSE_VERSION) -- Found Eigen: D:/0-python_work/OpenSfM/vcpkg/installed/x64-windows/include (found version "3.4.0") CMake Warning (dev) at C:/Program Files/CMake/share/cmake-3.24/Modules/FindPackageHandleStandardArgs.cmake:438 (message): The package name passed to find_package_handle_standard_args (ceres) does not match the name of the calling package (Ceres). This can lead to problems in calling code that expects find_package result variables (e.g., _FOUND) to follow a certain pattern. Call Stack (most recent call first): cmake/FindCeres.cmake:49 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) D:/0-python_work/OpenSfM/vcpkg/scripts/buildsystems/vcpkg.cmake:829 (_find_package) CMakeLists.txt:39 (find_package) This warning is for project developers. Use -Wno-dev to suppress it.

-- Found ceres: D:/0-python_work/OpenSfM/vcpkg/installed/x64-windows/lib/ceres.lib -- No preference for use of exported gflags CMake configuration set, and no hints for include/library directories provided. Defaulting to preferring an installed/exported gflags CMake configuration if available. -- Found installed version of gflags: D:/0-python_work/OpenSfM/vcpkg/installed/x64-windows/share/gflags -- Detected gflags version: 2.2.2 -- Found OpenCV: D:/0-python_work/OpenSfM/vcpkg/installed/x64-windows (found version "4.6.0") -- Found OpenCV: D:/0-python_work/OpenSfM/vcpkg/installed/x64-windows (found version "4.6.0") found components: core imgproc calib3d imgcodecs -- pybind11 v2.11.0 dev1 -- Found PythonInterp: C:/ProgramData/Anaconda3/python.exe (found suitable version "3.9.7", minimum required is "3.6") -- Found PythonLibs: C:/ProgramData/Anaconda3/libs/python39.lib -- Performing Test HAS_MSVC_GL_LTCG -- Performing Test HAS_MSVC_GL_LTCG - Success -- Configuring done -- Generating done -- Build files have been written to: D:/0-python_work/OpenSfM/cmake_build Compiling extension... Traceback (most recent call last): File "D:\0-python_work\OpenSfM\setup.py", line 49, in build_c_extension() File "D:\0-python_work\OpenSfM\setup.py", line 45, in build_c_extension subprocess.check_call(['make', '-j4'], cwd='cmake_build') File "C:\ProgramData\Anaconda3\lib\subprocess.py", line 368, in check_call retcode = call(*popenargs, *kwargs) File "C:\ProgramData\Anaconda3\lib\subprocess.py", line 349, in call with Popen(popenargs, **kwargs) as p: File "C:\ProgramData\Anaconda3\lib\subprocess.py", line 951, in init self._execute_child(args, executable, preexec_fn, close_fds, File "C:\ProgramData\Anaconda3\lib\subprocess.py", line 1420, in _execute_child hp, ht, pid, tid = _winapi.CreateProcess(executable, args, FileNotFoundError: [WinError 2] The system cannot find the file specified

fabianschenk commented 1 year ago

Hi @uestcwcw,

Do you have cmake installed?

Best, Fabian

uestcwcw commented 1 year ago

Hi @fabianschenk, Yes,I have installed cmake

fabianschenk commented 1 year ago

Hi @uestcwcw,

I don't have a Windows computer and can't test it. Windows seems to very tricky to set up judging from the amount of issues we see on github. Maybe a Google search can help you. If you fix the problem, it would be amazing if you can share your solution or even create a PR.

Good luck, Fabian

uestcwcw commented 1 year ago

Hi @fabianschenk Thank you

daria-solovyeva commented 1 year ago

Hi @uestcwcw Did you ever manage to build on windows, or did you end up approaching it differently? (linux subsystem, etc)

uzibuxing commented 1 year ago

Sir, I find the some question. Did you solved it?

hirleman commented 1 year ago

I have the problem and same question. A little different build process: Someone somewhere on google said add "shell = True" but I couldn't get that to work either.

C:\Program Files\OpenSfM\OpenSfM>python setup.py build_doc Configuring for python 3.9... Traceback (most recent call last): File "C:\Program Files\OpenSfM\OpenSfM\setup.py", line 59, in configure_c_extension() File "C:\Program Files\OpenSfM\OpenSfM\setup.py", line 43, in configure_c_extension subprocess.check_call(cmake_command, cwd="cmake_build") File "C:\Program Files\Python39\lib\subprocess.py", line 368, in check_call retcode = call(*popenargs, *kwargs) File "C:\Program Files\Python39\lib\subprocess.py", line 349, in call with Popen(popenargs, **kwargs) as p: File "C:\Program Files\Python39\lib\subprocess.py", line 951, in init self._execute_child(args, executable, preexec_fn, close_fds, File "C:\Program Files\Python39\lib\subprocess.py", line 1420, in _execute_child hp, ht, pid, tid = _winapi.CreateProcess(executable, args, FileNotFoundError: [WinError 2] The system cannot find the file specified

dubing-bit commented 1 year ago

I have the same problem. Have you solved it

hqzqaq commented 6 months ago

OpenSfm can be installed on windows using the linux subsystem via wsl2.

IoflyTang commented 3 days ago

I have the problem and same question. A little different build process: Someone somewhere on google said add "shell = True" but I couldn't get that to work either.

C:\Program Files\OpenSfM\OpenSfM>python setup.py build_doc Configuring for python 3.9... Traceback (most recent call last): File "C:\Program Files\OpenSfM\OpenSfM\setup.py", line 59, in configure_c_extension() File "C:\Program Files\OpenSfM\OpenSfM\setup.py", line 43, in configure_c_extension subprocess.check_call(cmake_command, cwd="cmake_build") File "C:\Program Files\Python39\lib\subprocess.py", line 368, in check_call retcode = call(*popenargs, *kwargs) File "C:\Program Files\Python39\lib\subprocess.py", line 349, in call with Popen(popenargs, kwargs) as p: File "C:\Program Files\Python39\lib\subprocess.py", line 951, in init** self._execute_child(args, executable, preexec_fn, close_fds, File "C:\Program Files\Python39\lib\subprocess.py", line 1420, in _execute_child hp, ht, pid, tid = _winapi.CreateProcess(executable, args, FileNotFoundError: [WinError 2] The system cannot find the file specified

I have the same problem, did you solve it?

hqzqaq commented 3 days ago

I have the problem and same question. A little different build process: Someone somewhere on google said add "shell = True" but I couldn't get that to work either.我有这个问题和同样的问题。构建过程略有不同:谷歌上有人说添加“shell = True”,但我也无法让它工作。 C:\Program Files\OpenSfM\OpenSfM>python setup.py build_doc Configuring for python 3.9... Traceback (most recent call last): File "C:\Program Files\OpenSfM\OpenSfM\setup.py", line 59, in configure_c_extension() File "C:\Program Files\OpenSfM\OpenSfM\setup.py", line 43, in configure_c_extension subprocess.check_call(cmake_command, cwd="cmake_build") File "C:\Program Files\Python39\lib\subprocess.py", line 368, in check_call retcode = call(*popenargs, kwargs) File "C:\Program Files\Python39\lib\subprocess.py", line 349, in call with Popen(*popenargs, kwargs) as p: File "C:\Program Files\Python39\lib\subprocess.py", line 951, in init* self._execute_child(args, executable, preexec_fn, close_fds, File "C:\Program Files\Python39\lib\subprocess.py", line 1420, in _execute_child hp, ht, pid, tid = _winapi.CreateProcess(executable, args, FileNotFoundError: [WinError 2] The system cannot find the file specifiedC:\Program Files\OpenSfM\OpenSfM>python setup.py build_doc 配置 python 3.9...回溯(最近一次调用):文件“C:\Program Files\OpenSfM\OpenSfM\setup.py”,第 59 行,在configure_c_extension()文件“C:\ Program Files \ OpenSfM \ OpenSfM \ setup.py”中,第43行,在configure_c_extension subprocess.check_call(cmake_command,cwd =“cmake_build”)文件“C:\ Program Files \ Python39 \ lib \ subprocess.py”,第 368 行,在 check_call retcode = call(popenargs, kwargs) 文件“C:\Program Files\Python39\lib\subprocess.py”,第 349 行,在调用 Popen(popenargs, *kwargs) as p: 文件“C:\Program Files\Python39\lib\subprocess.py”,第 951 行,在 init self._execute_child(args,executable, preexec_fn, close_fds, File“C:\Program Files\Python39\ lib\subprocess.py", 第 1420 行,在 _execute_child hp, ht, pid, tid = _winapi.CreateProcess(executable, args, FileNotFoundError: [WinError 2] 系统找不到指定的文件

I have the same problem, did you solve it?我也有同样的问题,你解决了吗?

It is recommended that you use its dockefile file to build docker images. You can also use my built image.

docker pull hqzqaq/opensfm:latest