Scala Breeze Unable to load windows 64 dll

倖福魔咒の 提交于 2019-12-13 03:20:50

问题


Hi I'm trying to use the Breeze library for Scala but keep running into this error:

[error] (run-main) java.lang.ExceptionInInitializerError: unable to load from [netlib-native_system-win-x86_64.dll]

for some reasone that dll won't load when running my code. I'm using SBT, here is my build.st

name := "BreezeTest"

version := "1.0"

scalaVersion := "2.10.3"

libraryDependencies  ++= Seq(
        "org.scalanlp" % "breeze_2.10" % "0.5.2",
        "org.scalanlp" % "breeze-viz_2.10" % "0.5.2"
)

Has anyone else had similar problems or know what might be causing this?

Thanks.


回答1:


Take a look at the windows section of the readme here: https://github.com/fommil/netlib-java

Windows

The native_system builds expect to find libblas3.dll and liblapack3.dll on the %PATH% (or current working directory). Besides vendor-supplied implementations, OpenBLAS provide generically tuned binaries, and it is possible to build ATLAS.>

Use Dependency Walker to help resolve any problems such as: UnsatisfiedLinkError (Can't find dependent libraries).

NOTE: OpenBLAS doesn't provide separate libraries so you will have to customise the build or copy the binary into both libblas3.dll and liblapack3.dll whilst also obtaining a copy of libgfortran-1-3.dll, libquadmath-0.dll and libgcc_s_seh-1.dll from MinGW.

I should add you can also just set these JVM properties; it will be slower, but it will guaranteed to work:

-Dcom.github.fommil.netlib.BLAS=com.github.fommil.netlib.F2jBLAS
-Dcom.github.fommil.netlib.LAPACK=com.github.fommil.netlib.F2jLAPACK
-Dcom.github.fommil.netlib.ARPACK=com.github.fommil.netlib.F2jARPACK

I should probably add an FAQ to Breeze.



来源:https://stackoverflow.com/questions/19826607/scala-breeze-unable-to-load-windows-64-dll

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!