我有一台 Windows 上的 ARM 机器(Snapdragon X Elite)。所以尝试了
pip install polars
但遇到了一些问题。
failed to run custom build command for `ring v0.17.8`
warning: [email protected]: Compiler family detection failed due to error:
ToolNotFound: Failed to find tool. Is `clang` installed?
(see https://docs.rs/cc/latest/cc/#compile-time-requirements for help)
根据https://github.com/briansmith/ring/blob/main/BUILDING.md我安装了 Visual Studio 2022
MSVC v143 - VS 2022 C++ ARM64/ARM64EC build tools
和C++ Clang Compiler for Windows
然后将
C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Tools\Llvm\ARM64\bin
添加到我的PATH
环境变量中,这样就可以找到clang.exe
。
error: failed to run custom build command for `libz-ng-sys v1.1.20`
failed to execute command: program not found
is `cmake` not installed?
所以我也将
C:\Program Files\Microsoft Visual Studio\2022\Preview\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin
添加到 PATH
,这样就可以找到 cmake.exe
。
libz-ng-sys 上仍然失败,这是最后的错误:
error: failed to run custom build command for `libz-ng-sys v1.1.20`
CMake Error at C:/Program Files/Microsoft Visual Studio/2022/Preview/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.30/Modules/CMakeTestCCompiler.cmake:67 (message):
The C compiler
"C:/Program Files/Microsoft Visual Studio/2022/Preview/VC/Tools/MSVC/14.43.34604/bin/Hostx64/arm64/cl.exe"
is not able to compile a simple test program.
有没有办法解决最后一个问题,并以某种方式在Windows上的ARM上使用
polars
?
(完整日志可以在这里找到:https://github.com/pola-rs/polars/issues/19960)
我能够使用此命令 pip install Polars 安装 Polars 库。