我想使用pyflann模块进行最近邻搜索,如下所示:http://pythonhosted.org/laspy/tut_part_1.html。我有一个用于ArcGis的python 2.7。不幸的是,安装指南对我来说并不清楚,我在编译包时遇到问题(Laspy安装有pip而没有问题)。 http://www.cs.ubc.ca/research/flann/此处的指南说明安装如下:
"C:\Program Files\Microsoft Visual Studio 9.0\VC\vcvarsall.bat"
cd flann-x.y.z-src
mkdir build
cd build
cmake ..
nmake
我可以在这里找到vcvarsall. bat
:C:\Users\Gary\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0
当我尝试运行cmake ..
时,我收到一个错误,从C编译器识别开始是未知的。这是错误日志:
Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: C:\MinGW\bin
Build flags:
Id flags:
The output was:
1
Microsoft (R) Build Engine version 14.0.23107.0
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 9/21/2015 7:56:14 PM.
Project "C:\flann-1.8.4-src\build\CMakeFiles\3.3.2\CompilerIdC\CompilerIdC.vcxproj" on node 1 (default targets).
PrepareForBuild:
创建目录“Debug \”。
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppBuild.targets(366,5): warning MSB8003: Could not find WindowsSDKDir variable from the registry. TargetFrameworkVersion or PlatformToolset may be set to an invalid version number. [C:\flann-1.8.4-src\build\CMakeFiles\3.3.2\CompilerIdC\CompilerIdC.vcxproj]
Creating directory "Debug\CompilerIdC.tlog\".
InitializeBuildStatus:
Creating "Debug\CompilerIdC.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
ClCompile:
C:\Users\Gary\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\CL.exe /c /nologo /W0 /WX- /Od /Oy- /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"Debug\\" /Fd"Debug\vc140.pdb" /Gd /TC /analyze- /errorReport:queue CMakeCCompilerId.c
cl : Command line warning D9002: ignoring unknown option '/Zc:inline' [C:\flann-1.8.4-src\build\CMakeFiles\3.3.2\CompilerIdC\CompilerIdC.vcxproj]
CMakeCCompilerId.c 链接:
C:\Users\Gary\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\link.exe /ERRORREPORT:QUEUE /OUT:".\CompilerIdC.exe" /INCREMENTAL:NO /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /PDB:".\CompilerIdC.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:".\CompilerIdC.lib" /MACHINE:X86 /SAFESEH Debug\CMakeCCompilerId.obj
LINK : fatal error LNK1117: syntax error in option 'manifest:embed' [C:\flann-1.8.4-src\build\CMakeFiles\3.3.2\CompilerIdC\CompilerIdC.vcxproj]
Done Building Project "C:\flann-1.8.4-src\build\CMakeFiles\3.3.2\CompilerIdC\CompilerIdC.vcxproj" (default targets) -- FAILED.
构建失败。
"C:\flann-1.8.4-src\build\CMakeFiles\3.3.2\CompilerIdC\CompilerIdC.vcxproj" (default target) (1) ->
(PrepareForBuild target) ->
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppBuild.targets(366,5): warning MSB8003: Could not find WindowsSDKDir variable from the registry. TargetFrameworkVersion or PlatformToolset may be set to an invalid version number. [C:\flann-1.8.4-src\build\CMakeFiles\3.3.2\CompilerIdC\CompilerIdC.vcxproj]
"C:\flann-1.8.4-src\build\CMakeFiles\3.3.2\CompilerIdC\CompilerIdC.vcxproj" (default target) (1) ->
(ClCompile target) ->
cl : Command line warning D9002: ignoring unknown option '/Zc:inline' [C:\flann-1.8.4-src\build\CMakeFiles\3.3.2\CompilerIdC\CompilerIdC.vcxproj]
"C:\flann-1.8.4-src\build\CMakeFiles\3.3.2\CompilerIdC\CompilerIdC.vcxproj" (default target) (1) ->
(Link target) ->
LINK : fatal error LNK1117: syntax error in option 'manifest:embed' [C:\flann-1.8.4-src\build\CMakeFiles\3.3.2\CompilerIdC\CompilerIdC.vcxproj]
2 Warning(s)
1 Error(s)
时间流逝00:00:01.02
检查C编译器是否使用“”IAR与“IAR。+编译器”不匹配: 编译CXX编译器标识源文件“CMakeCXXCompilerId.cpp”失败。 编译器:C:\ MinGW \ bin 建立标志: Id标志:
输出结果为: 1 Microsoft(R)Build Engine版本14.0.23107.0 版权所有(C)Microsoft Corporation。保留所有权利。
Build started 9/21/2015 7:56:16 PM.
Project "C:\flann-1.8.4-src\build\CMakeFiles\3.3.2\CompilerIdCXX\CompilerIdCXX.vcxproj" on node 1 (default targets).
PrepareForBuild:
C
reating directory "Debug\".
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppBuild.targets(366,5): warning MSB8003: Could not find WindowsSDKDir variable from the registry. TargetFrameworkVersion or PlatformToolset may be set to an invalid version number. [C:\flann-1.8.4-src\build\CMakeFiles\3.3.2\CompilerIdCXX\CompilerIdCXX.vcxproj]
Creating directory "Debug\CompilerIdCXX.tlog\".
InitializeBuildStatus:
创建“Debug \ CompilerIdCXX.tlog \ unsuccessfulbuild”,因为指定了“AlwaysCreate”。 ClCompile:
C:\Users\Gary\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\CL.exe /c /nologo /W0 /WX- /Od /Oy- /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"Debug\\" /Fd"Debug\vc140.pdb" /Gd /TP /analyze- /errorReport:queue CMakeCXXCompilerId.cpp
cl : Command line warning D9002: ignoring unknown option '/Zc:inline' [C:\flann-1.8.4-src\build\CMakeFiles\3.3.2\CompilerIdCXX\CompilerIdCXX.vcxproj]
CMakeCXXCompilerId.cpp 链接:
`C:\Users\Gary\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\link.exe /ERRORREPORT:QUEUE /OUT:".\CompilerIdCXX.exe" /INCREMENTAL:NO /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /PDB:".\CompilerIdCXX.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:".\CompilerIdCXX.lib" /MACHINE:X86 /SAFESEH` Debug\CMakeCXXCompilerId.obj
LINK:致命错误LNK1117:选项'manifest:embed'中的语法错误
[C:\flann-1.8.4-src\build\CMakeFiles\3.3.2\CompilerIdCXX\CompilerIdCXX.vcxproj]
Done Building Project "C:\flann-1.8.4-src\build\CMakeFiles\3.3.2\CompilerIdCXX\CompilerIdCXX.vcxproj" (default targets) -- FAILED.
构建失败。
“
C:\flann-1.8.4-src\build\CMakeFiles\3.3.2\CompilerIdCXX\CompilerIdCXX.vcxproj" (default target) (1) ->
(PrepareForBuild target) ->
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppBuild.targets(366,5): warning MSB8003: Could not find WindowsSDKDir variable from the registry. TargetFrameworkVersion or PlatformToolset may be set to an invalid version number. [C:\flann-1.8.4-src\build\CMakeFiles\3.3.2\CompilerIdCXX\CompilerIdCXX.vcxproj]
"C:\flann-1.8.4-src\build\CMakeFiles\3.3.2\CompilerIdCXX\CompilerIdCXX.vcxproj" (default target) (1) ->
(ClCompile target) ->
cl : Command line warning D9002: ignoring unknown option '/Zc:inline' [C:\flann-1.8.4-src\build\CMakeFiles\3.3.2\CompilerIdCXX\CompilerIdCXX.vcxproj]
"C:\flann-1.8.4-src\build\CMakeFiles\3.3.2\CompilerIdCXX\CompilerIdCXX.vcxproj" (default target) (1) ->
(Link target) ->
LINK : fatal error LNK1117: syntax error in option 'manifest:embed' [C:\flann-1.8.4-src\build\CMakeFiles\3.3.2\CompilerIdCXX\CompilerIdCXX.vcxproj]
2 Warning(s)
1 Error(s)
时间流逝00:00:00.65
检查CXX编译器是否使用“”IAR与“IAR。+编译器”不匹配: