似乎有人在 GitHub 上报告了此问题,但我仍然找不到明确的解决方案 - 在 Windows 上安装 python 模块的最后一步中,在“”下没有名为“/Wrapping/Python/Packaging”的文件夹SimpleITK-build”,其中没有名为“setup.py”的文件。人们指出,这可能是来自不正确的 Python 路径的问题。我尝试将Anaconda下的Python Path添加到系统中,以便可以通过cmd访问,但是并没有解决问题。然后我卸载了Anaconda,重新安装了一个单独的Python并将Python Path添加到系统中,它也没有解决问题。有人可以分享一些如何解决这个问题的经验吗?我会很感激你的帮助。
菱花
下面是 CMakeCacheInit 文件:
set( PYTHON_VIRTUALENV_SCRIPT "D:/SimpleElastix/virtualenv/virtualenv.py" CACHE "STRING" "" FORCE )
set( SimpleITK_4D_IMAGES "ON" CACHE "BOOL" "Add Image and I/O support for four spatial dimensions." FORCE )
mark_as_advanced( SimpleITK_4D_IMAGES )
set( SimpleITK_GIT_PROTOCOL "https" CACHE "STRING" "If behind a firewall turn set this to 'https' or 'http'." FORCE )
mark_as_advanced( SimpleITK_GIT_PROTOCOL )
set_property(CACHE SimpleITK_GIT_PROTOCOL PROPERTY STRINGS "https;http;git")
set( SimpleITK_LUA_EXECUTABLE "D:/SimpleElastix/Lua/bin/lua" CACHE "STRING" "" FORCE )
set( SimpleITK_OPENMP "OFF" CACHE "BOOL" "If available, use OpenMP to speed up certain elastix computations." FORCE )
mark_as_advanced( SimpleITK_OPENMP )
set( ExternalData_OBJECT_STORES "D:/SimpleElastix/ExternalData/Objects;/../.ExternalData" CACHE "STRING" "Semicolon-separated list of local directories holding data objects in the layout %(algo)/%(hash)." FORCE )
mark_as_advanced( ExternalData_OBJECT_STORES )
set( CMAKE_BUILD_TYPE "Release" CACHE "STRING" "" FORCE )
set( CMAKE_MAKE_PROGRAM "C:/Program Files \(x86\)/Microsoft Visual Studio/2019/Community/MSBuild/Current/Bin/MSBuild.exe" CACHE "STRING" "" FORCE )
set( CMAKE_C_COMPILER "C:/Program Files \(x86\)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.25.28610/bin/Hostx64/x64/cl.exe" CACHE "STRING" "" FORCE )
set( CMAKE_C_FLAGS "/DWIN32 /D_WINDOWS /W3" CACHE "STRING" "Flags used by the C compiler during all build types." FORCE )
mark_as_advanced( CMAKE_C_FLAGS )
set( CMAKE_C_FLAGS_DEBUG "/MDd /Zi /Ob0 /Od /RTC1" CACHE "STRING" "Flags used by the C compiler during DEBUG builds." FORCE )
mark_as_advanced( CMAKE_C_FLAGS_DEBUG )
set( CMAKE_C_FLAGS_MINSIZEREL "/MD /O1 /Ob1 /DNDEBUG" CACHE "STRING" "Flags used by the C compiler during MINSIZEREL builds." FORCE )
mark_as_advanced( CMAKE_C_FLAGS_MINSIZEREL )
set( CMAKE_C_FLAGS_RELEASE "/MD /O2 /Ob2 /DNDEBUG" CACHE "STRING" "Flags used by the C compiler during RELEASE builds." FORCE )
mark_as_advanced( CMAKE_C_FLAGS_RELEASE )
set( CMAKE_C_FLAGS_RELWITHDEBINFO "/MD /Zi /O2 /Ob1 /DNDEBUG" CACHE "STRING" "Flags used by the C compiler during RELWITHDEBINFO builds." FORCE )
mark_as_advanced( CMAKE_C_FLAGS_RELWITHDEBINFO )
set( CMAKE_CXX_COMPILER "C:/Program Files \(x86\)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.25.28610/bin/Hostx64/x64/cl.exe" CACHE "STRING" "" FORCE )
set( CMAKE_CXX_FLAGS "/DWIN32 /D_WINDOWS /W3 /GR /EHsc" CACHE "STRING" "Flags used by the CXX compiler during all build types." FORCE )
mark_as_advanced( CMAKE_CXX_FLAGS )
set( CMAKE_CXX_FLAGS_DEBUG "/MDd /Zi /Ob0 /Od /RTC1" CACHE "STRING" "Flags used by the CXX compiler during DEBUG builds." FORCE )
mark_as_advanced( CMAKE_CXX_FLAGS_DEBUG )
set( CMAKE_CXX_FLAGS_MINSIZEREL "/MD /O1 /Ob1 /DNDEBUG" CACHE "STRING" "Flags used by the CXX compiler during MINSIZEREL builds." FORCE )
mark_as_advanced( CMAKE_CXX_FLAGS_MINSIZEREL )
set( CMAKE_CXX_FLAGS_RELEASE "/MD /O2 /Ob2 /DNDEBUG" CACHE "STRING" "Flags used by the CXX compiler during RELEASE builds." FORCE )
mark_as_advanced( CMAKE_CXX_FLAGS_RELEASE )
set( CMAKE_CXX_FLAGS_RELWITHDEBINFO "/MD /Zi /O2 /Ob1 /DNDEBUG" CACHE "STRING" "Flags used by the CXX compiler during RELWITHDEBINFO builds." FORCE )
mark_as_advanced( CMAKE_CXX_FLAGS_RELWITHDEBINFO )
set( CMAKE_LINKER "C:/Program Files \(x86\)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.25.28610/bin/Hostx64/x64/link.exe" CACHE "FILEPATH" "Path to a program." FORCE )
mark_as_advanced( CMAKE_LINKER )
set( CMAKE_EXE_LINKER_FLAGS "/machine:x64" CACHE "STRING" "Flags used by the linker during all build types." FORCE )
mark_as_advanced( CMAKE_EXE_LINKER_FLAGS )
set( CMAKE_EXE_LINKER_FLAGS_DEBUG "/debug /INCREMENTAL:NO" CACHE "STRING" "Flags used by the linker during DEBUG builds." FORCE )
mark_as_advanced( CMAKE_EXE_LINKER_FLAGS_DEBUG )
set( CMAKE_EXE_LINKER_FLAGS_MINSIZEREL "/INCREMENTAL:NO" CACHE "STRING" "Flags used by the linker during MINSIZEREL builds." FORCE )
mark_as_advanced( CMAKE_EXE_LINKER_FLAGS_MINSIZEREL )
set( CMAKE_EXE_LINKER_FLAGS_RELEASE "/INCREMENTAL:NO" CACHE "STRING" "Flags used by the linker during RELEASE builds." FORCE )
mark_as_advanced( CMAKE_EXE_LINKER_FLAGS_RELEASE )
set( CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "/debug /INCREMENTAL:NO" CACHE "STRING" "Flags used by the linker during RELWITHDEBINFO builds." FORCE )
mark_as_advanced( CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO )
set( CMAKE_MODULE_LINKER_FLAGS "/machine:x64" CACHE "STRING" "Flags used by the linker during the creation of modules during all build types." FORCE )
mark_as_advanced( CMAKE_MODULE_LINKER_FLAGS )
set( CMAKE_MODULE_LINKER_FLAGS_DEBUG "/debug /INCREMENTAL:NO" CACHE "STRING" "Flags used by the linker during the creation of modules during DEBUG builds." FORCE )
mark_as_advanced( CMAKE_MODULE_LINKER_FLAGS_DEBUG )
set( CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL "/INCREMENTAL:NO" CACHE "STRING" "Flags used by the linker during the creation of modules during MINSIZEREL builds." FORCE )
mark_as_advanced( CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL )
set( CMAKE_MODULE_LINKER_FLAGS_RELEASE "/INCREMENTAL:NO" CACHE "STRING" "Flags used by the linker during the creation of modules during RELEASE builds." FORCE )
mark_as_advanced( CMAKE_MODULE_LINKER_FLAGS_RELEASE )
set( CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO "/debug /INCREMENTAL:NO" CACHE "STRING" "Flags used by the linker during the creation of modules during RELWITHDEBINFO builds." FORCE )
mark_as_advanced( CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO )
set( CMAKE_SHARED_LINKER_FLAGS "/machine:x64" CACHE "STRING" "Flags used by the linker during the creation of shared libraries during all build types." FORCE )
mark_as_advanced( CMAKE_SHARED_LINKER_FLAGS )
set( CMAKE_SHARED_LINKER_FLAGS_DEBUG "/debug /INCREMENTAL:NO" CACHE "STRING" "Flags used by the linker during the creation of shared libraries during DEBUG builds." FORCE )
mark_as_advanced( CMAKE_SHARED_LINKER_FLAGS_DEBUG )
set( CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL "/INCREMENTAL:NO" CACHE "STRING" "Flags used by the linker during the creation of shared libraries during MINSIZEREL builds." FORCE )
mark_as_advanced( CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL )
set( CMAKE_SHARED_LINKER_FLAGS_RELEASE "/INCREMENTAL:NO" CACHE "STRING" "Flags used by the linker during the creation of shared libraries during RELEASE builds." FORCE )
mark_as_advanced( CMAKE_SHARED_LINKER_FLAGS_RELEASE )
set( CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO "/debug /INCREMENTAL:NO" CACHE "STRING" "Flags used by the linker during the creation of shared libraries during RELWITHDEBINFO builds." FORCE )
mark_as_advanced( CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO )
set( CMAKE_DL_LIBS "" CACHE "STRING" "" FORCE )
set( CMAKE_SYSTEM_PREFIX_PATH "C:/Program Files;C:/Program Files \(x86\);C:/Program Files/CMake;D:/SimpleElastix" CACHE "STRING" "" FORCE )
set( CMAKE_SYSTEM_LIBRARY_PATH "D:/SimpleElastix/bin;C:/Program Files/CMake/bin;/bin" CACHE "STRING" "" FORCE )
set( CMAKE_GENERATOR "Visual Studio 16 2019" CACHE "INTERNAL" "Name of generator." FORCE )
set( CMAKE_EXTRA_GENERATOR "" CACHE "INTERNAL" "Name of external makefile project generator." FORCE )
set( SITE "NoSiteGiven" CACHE "STRING" "" FORCE )
set( BUILDNAME "NoBuldNameGiven" CACHE "STRING" "" FORCE )
set( PYTHON_DEBUG_LIBRARY "PYTHON_DEBUG_LIBRARY-NOTFOUND" CACHE "FILEPATH" "Path to a library." FORCE )
mark_as_advanced( PYTHON_DEBUG_LIBRARY )
set( PYTHON_EXECUTABLE "C:/Users/Linghua Zhang/AppData/Local/Programs/Python/Python37/python.exe" CACHE "FILEPATH" "Path to a program." FORCE )
mark_as_advanced( PYTHON_EXECUTABLE )
set( PYTHON_LIBRARY "C:/Users/Linghua Zhang/AppData/Local/Programs/Python/Python37/libs/python37.lib" CACHE "FILEPATH" "Path to a library." FORCE )
mark_as_advanced( PYTHON_LIBRARY )
set( PYTHON_INCLUDE_DIR "C:/Users/Linghua Zhang/AppData/Local/Programs/Python/Python37/include" CACHE "PATH" "Path to a file." FORCE )
mark_as_advanced( PYTHON_INCLUDE_DIR )