Scala Breeze无法加载Windows 64 dll [英] Scala Breeze Unable to load windows 64 dll

查看:115
本文介绍了Scala Breeze无法加载Windows 64 dll的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将Breeze库用于Scala,但始终会遇到此错误:

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]

出于某些原因,运行我的代码时dll无法加载.我正在使用SBT,这是我的build.st

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?

谢谢.

推荐答案

在此处查看自述文件的Windows部分: https://github.com/fommil/netlib-java

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

Windows

Windows

native_system构建期望找到libblas3.dll和 %PATH%(或当前工作目录)上的liblapack3.dll.除了 供应商提供的实现,OpenBLAS提供了经过通用调整的 二进制文件,并且可以构建ATLAS.>

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.>

使用Dependency Walker帮助解决任何问题,例如: UnsatisfiedLinkError(找不到依赖库).

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

注意:OpenBLAS不提供单独的库,因此您必须 自定义生成或将二进制文件复制到libblas3.dll和 liblapack3.dll,同时还获得libgfortran-1-3.dll的副本, 来自MinGW的libquadmath-0.dll和libgcc_s_seh-1.dll.

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.

我应该添加您也可以只设置这些JVM属性;它会比较慢,但是可以保证工作:

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

我可能应该在Breeze中添加一个常见问题解答.

I should probably add an FAQ to Breeze.

这篇关于Scala Breeze无法加载Windows 64 dll的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆