Error when building setup.py on Windows
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 3.8k
- Forks
- 899
- PR merge metrics
- No merged PRs in 30d
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in setup.py at build_c_extension, especially line 45, and review the build command run from cmake_build on Windows. Reproduce the setup process with the shown Python and CMake configuration, then verify that the extension build no longer fails with WinError 2 and completes successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, python
- Domain
- build-system, operating-systems
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100