Home > Software engineering >  Installing pyclblast on windows 10 with clblast vcpkg
Installing pyclblast on windows 10 with clblast vcpkg

Time:04-23

I am trying to install the python package pyclblast on Windows 10.

pip3 install pyclblast

fails with

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 Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe' failed with exit code 2

I have clblast installed via vcpkg. The header file is located at C:\\dev\\vcpkg\\packages\\cblast_x64-windows\\include. How do I tell pip3 where to look? I tried

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

where ... is the path from above, but that failed with

invalid command name /IC:\\....

CodePudding user response:

I found the correct way:

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"

The installation succeeds now, but the module can still not be imported. I will open a new question for that.

  • Related