numo-linalg
numo-linalg copied to clipboard
Cannot install/use on windows 10
Hi,
I am struggling to make numo-linalg (0.1.5) work in windows 10. I am using it successfully on macos. It is amazing BTW :-)
Notes:
- I am using Msys2
- I have installed numo-narray
- I have installed openblas using pacman
- I have also tried to compile it from source. Same results
- I have installed lapack using pacman
libopenblas.a and liblapacke.a are both in C:\msys64\mingw64\lib so I install the gem with
gem install numo-linalg -- --with-openblas-dir=C:\msys64\mingw64\lib --with-lapack-lib=C:\msys64\mingw64\lib
The problem is that when I try default, level 1, 2 or 3, for example
require "numo/linalg/linalg"
Numo::Linalg::Loader.load_openblas "C:\\msys64\\mingw64\\lib"
I always get
RuntimeError: cannot find OpenBLAS library
from C:/Apps/rubies/Ruby22-x64/lib/ruby/gems/2.2.0/gems/numo-linalg-0.1.5/lib/numo/linalg/loader.rb:90:in `load_openblas'
Any idea? Thanks
@Rojj I have succeeded in using the Numo::Linalg by not specifying the OpenBLAS library path. Please try that.

Sorry, maybe it was not clear that I am using Ruby 2.2.4 (Unfortunately I cannot upgrade)
That was my first attempt. I also just tried on my work PC (Windows 10 and Ruby Installer 2.2.4). It installs without any error, but when I execute
require 'numo/linalg'
i get the following error
C:/Rubies/Ruby22-x64/lib/ruby/gems/2.2.0/gems/numo-linalg-0.1.5/lib/numo/linalg/loader.rb:162:in `load_library': cannot find backend library for Numo::Linalg (RuntimeError)
from C:/Rubies/Ruby22-x64/lib/ruby/gems/2.2.0/gems/numo-linalg-0.1.5/lib/numo/linalg.rb:3:in `<top (required)>'
from C:/Rubies/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:128:in `require'
from C:/Rubies/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:128:in `rescue in require'
from C:/Rubies/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:39:in `require'
from linalg.rb:1:in `<main>'
Is there a minimum Ruby version?
I tried to load the libraries directly with Ruby Installer 2.6.6 as follows:
require 'numo/linalg/linalg'
Numo::Linalg::Blas.dlopen 'C:\msys64\mingw64\lib\libopenblas.dll.a'
Numo::Linalg::Lapack.dlopen 'C:\msys64\mingw64\lib\liblapacke.dll.a'
However, I obtained RuntimeError (Exec format error). This error is due to the system and architecture, not to the Numo::Linalg codes. So, it is difficult for me to investigate the cause of this error further.
I think that it is difficult to load OpenBLAS on Msys2 with Ruby installed by RubyInstaller.
@Rojj Could you try #42?