安装pyflannforpython2.7

2024-05-12 18:29:49 发布

您现在位置:Python中文网/ 问答频道 /正文

我想使用pyflann模块进行最近邻搜索,如下所示:http://pythonhosted.org/laspy/tut_part_1.html。我有一个用于ArcGis的Python2.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. batC:\Users\Gary\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0当我试图运行cmake ..时,我从C编译器标识未知开始出错。以下是错误日志:

^{pr2}$

Creating 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\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)生成引擎版本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:

创建“调试\CompilerIdCXX.tlog\“Build”失败,因为指定了“AlwaysCreate”。 编译:

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

链接:致命错误LNK117:选项中的语法错误'清单:嵌入'

[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.+编译器”不匹配:


Tags: debugbuildsrcdefaulttarget编译器libzc