JuliaML / LIBSVM.jl

LIBSVM bindings for Julia
Other
88 stars 35 forks source link

error using LIBSVM in Julia v0.5 #18

Closed fielman closed 7 years ago

fielman commented 8 years ago

Hi

Apologies if I miss something obvious. Just trying to get any svm package to work in Julia. I've installed LIBSVM and used Pkg.checkout("LIBSVM") as a suggestion from one of the members from Junolab. No issues when I compile for the first time i.e. using LIBSVM, but I get the following error when I apply svmtrain:

julia> svmtrain(labels,vars2["X"]') ERROR: could not load library "C:\Users\user.julia\v0.5\LIBSVM\deps\libsvm.so.2" The specified module could not be found.

in dlopen(::String, ::UInt32) at .\libdl.jl:90 in get_libsvm() at C:\Users\user.julia\v0.5\LIBSVM\src\LIBSVM.jl:86 in svm_train() at C:\Users\user.julia\v0.5\LIBSVM\src\LIBSVM.jl:101 in #svmtrain#1(::Int32, ::Int32, ::Int64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Bool, ::Bool, ::Void, ::Bool, ::LIBSVM.#svmtrain, ::Array{Float64,1}, ::Array{Float64,2}) at C:\Users\user.julia\v0.5\LIBSVM\src\LIBSVM.jl:227 in svmtrain(::Array{Float64,1}, ::Array{Float64,2}) at C:\Users\user.julia\v0.5\LIBSVM\src\LIBSVM.jl:210

Thanks in advance

chaonan99 commented 8 years ago

You should build this package by Pkg.build("LIBSVM") to generate this lib because this package is a binding to LIBSVM, meaning that you should have LIBSVM installed. Note that this may still cause problem if you don't have make on your system (Seems that you are Windows user like me). But you can change this line to your own make program, like mingw32-make lib. You may also download this lib from official LIBSVM site.

mpastell commented 7 years ago

I have added a binary .dll that will get downloaded on build