使用 clblast vcpkg 在 windows 10 上安装 pyclblast

Installing pyclblast on windows 10 with clblast vcpkg

我正在尝试在 Windows 10 上安装 python 软件包 pyclblast

pip3 install pyclblast

失败

src\pyclblast.cpp(700): fatal error C1082: Cannot open include file: 'clblast_c.h': No such file or directory

error: command 'C:\Program Files (x86)\Microsoft Visual Studio19\BuildTools\VC\Tools\MSVC.29.30133\bin\HostX86\x64\cl.exe' failed with exit code 2

我通过 vcpkg 安装了 clblast。头文件位于 C:\dev\vcpkg\packages\cblast_x64-windows\include。我如何告诉 pip3 去哪里看?我试过了

pip3 install pyclblast --global-option="/I..."

其中 ... 是上面的路径,但是失败了

invalid command name /IC:\....

我找到了正确的方法:

pip3 install pyclblast --global-option=build_ext --global-option="-IC:\dev\vcpkg\packages\clblast_x64-windows\include;C:\dev\vcpkg\packages\opencl_x64-windows\include" --global-option="-LC:\dev\vcpkg\packages\opencl_x64-windows\lib;C:\dev\vcpkg\packages\clblast_x64-windows\lib"

现在安装成功,但是仍然无法导入模块。我会为此打开a new question