我正在尝试在我的Windows 10中安装llvmlite,所以我按照documentation的步骤进行操作:
You must have Visual Studio 2013 or later (the free “Express” edition is ok) in order to compile LLVM and llvmlite.
In addition, you must have cmake installed, and LLVM should have been built using cmake, in Release mode. Be
careful to use the right bitness (32- or 64-bit) for your Python installation.
所以,我已经掌握了所有内容,当我尝试使用命令python setup.py build
进行安装时,会发生以下错误:
Trying generator 'Visual Studio 12 2013'
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:3 (project):
No CMAKE_C_COMPILER could be found.
CMake Error at CMakeLists.txt:3 (project):
No CMAKE_CXX_COMPILER could be found.
-- Configuring incomplete, errors occurred!
See also "C:/Users/G1745 IRON/AppData/Local/Temp/tmpvzyvoz/CMakeFiles/CMakeOutput.log".
See also "C:/Users/G1745 IRON/AppData/Local/Temp/tmpvzyvoz/CMakeFiles/CMakeError.log".
Traceback (most recent call last):
File "C:\Python27\Lib\site-packages\llvmlite\ffi\build.py", line 152, in <module>
main()
File "C:\Python27\Lib\site-packages\llvmlite\ffi\build.py", line 140, in main
main_win32()
File "C:\Python27\Lib\site-packages\llvmlite\ffi\build.py", line 74, in main_win32
generator = find_win32_generator()
File "C:\Python27\Lib\site-packages\llvmlite\ffi\build.py", line 70, in find_win32_generator
raise RuntimeError("No compatible cmake generator installed on this machine")
RuntimeError: No compatible cmake generator installed on this machine
error: command 'C:\\Python27\\python.exe' failed with exit status 1
搜索了很多,我发现我应该使用以下命令cmake -G "Visual Studio 14 2015"
,但那是在返回:
CMake Error: The source directory "C:/Python27/Lib/site-packages/llvmlite" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
我非常感谢你的帮助。
答案 0 :(得分:0)
我使用Windows 10,python 2和python 3,并定期使用@roganjosh提供的链接来下载和安装预编译的二进制文件。我刚刚为干净安装重复了此操作,是的,它对llvmlite完美适用。也是numba的。