OpenSfM icon indicating copy to clipboard operation
OpenSfM copied to clipboard

Error when building setup.py on Windows

Open uestcwcw opened this issue 3 years ago • 11 comments

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

uestcwcw avatar Sep 21 '22 04:09 uestcwcw

Hi @uestcwcw,

Do you have cmake installed?

Best, Fabian

fabianschenk avatar Sep 21 '22 11:09 fabianschenk

Hi @fabianschenk, Yes,I have installed cmake

uestcwcw avatar Sep 21 '22 11:09 uestcwcw

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

fabianschenk avatar Sep 21 '22 11:09 fabianschenk

Hi @fabianschenk Thank you

uestcwcw avatar Sep 21 '22 11:09 uestcwcw

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

daria-solovyeva avatar Oct 25 '22 21:10 daria-solovyeva

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

uzibuxing avatar Jan 02 '23 07:01 uzibuxing

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

hirleman avatar Jan 28 '23 20:01 hirleman

I have the same problem. Have you solved it

dubing-bit avatar Jun 29 '23 02:06 dubing-bit

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

hqzqaq avatar Jan 14 '24 02:01 hqzqaq