ScikitLearn.jl
ScikitLearn.jl copied to clipboard
Missed dependency on OrderedCollections
Adding ScikitLearn has build errors if the environment does not already include the OrderedCollections package.
To reproduce:
Pkg.add("ScikitLearn")
Expected behaviour:
Scikitlearn.jl
package is installed and built
Actual behaviour (Error message):
Building ArgumentError: Package OrderedCollections not found in current path:
- Run `import Pkg; Pkg.add("OrderedCollections")` to install the OrderedCollections package.
I think the fix for this is to add OrderedCollections
as a dependency in Project.toml
- but I can't actually find the place in the code where `OrderedCollections is actually used.
🤔 Is that the full error message?
Sorry, here's the full message in all its glory:
(v1.2) pkg> add ScikitLearn
Resolving package versions...
Updating `C:\Users\username\.julia\environments\v1.2\Project.toml`
[3646fa90] + ScikitLearn v0.5.1
Updating `C:\Users\username\.julia\environments\v1.2\Manifest.toml`
[4fba245c] + ArrayInterface v1.2.1
[a74b3585] + Blosc v0.5.1
[631607c0] + CMake v1.1.2
[d5fb7624] + CMakeWrapper v0.2.3
[aaaa29a8] + Clustering v0.13.3
[7806a523] + DecisionTree v0.8.3
[01453d9d] + DiffEqDiffTools v1.3.0
[fdbdab4c] + ElasticArrays v0.4.0
[2904ab23] + ElasticPDMats v0.2.1
[8f5d6c58] + EzXML v0.9.4
[442a2c76] + FastGaussQuadrature v0.3.3
[cc18c42c] + GaussianMixtures v0.3.0
[891a1506] + GaussianProcesses v0.9.0
[f67ccb44] + HDF5 v0.12.3
[4138dd39] + JLD v0.9.1
[b964fa9f] + LaTeXStrings v1.0.3
[1b4a561d] + LegacyStrings v0.4.1
[d3d80556] + LineSearches v7.0.1
[78c3b35d] + Mocking v0.6.0
[0db19996] + NBInclude v2.1.0
[d41bc354] + NLSolversBase v7.4.1
[b8a86587] + NearestNeighbors v0.4.3
[429524aa] + Optim v0.19.2
[d96e819e] ↓ Parameters v0.11.0 ⇒ v0.10.3
[85a6dd25] + PositiveFactorizations v0.2.2
[438e738f] + PyCall v1.91.2
[d330b81b] + PyPlot v2.8.1
[df47a6cb] + RData v0.6.2
[ce6b1742] + RDatasets v0.6.1
[3646fa90] + ScikitLearn v0.5.1
[6e75b9c4] + ScikitLearnBase v0.5.0
[b85f4697] + SoftGlobalScope v1.0.10
[f269a46b] + TimeZones v0.9.2
ArgumentError: Package OrderedCollections not found in current path:
- Run `import Pkg; Pkg.add("OrderedCollections")` to install the OrderedCollections package.
(v1.2) pkg>
Stacktrace:
[1] require(::Module, ::Symbol) at .\loading.jl:876
[2] eval at .\boot.jl:330 [inlined]
[3] prepare_thunk(::Module, ::Expr, ::Bool) at C:\Users\username\.julia\packages\JuliaInterpreter\VHjfX\src\construct.jl:355
[4] prepare_thunk(::Module, ::Expr, ::Bool) at C:\Users\username\.julia\packages\JuliaInterpreter\VHjfX\src\construct.jl:361
[5] prepare_thunk at C:\Users\username\.julia\packages\JuliaInterpreter\VHjfX\src\construct.jl:347 [inlined]
[6] #methods_by_execution!#9(::Base.Iterators.Pairs{Symbol,Bool,Tuple{Symbol},NamedTuple{(:define,),Tuple{Bool}}}, ::typeof(Revise.methods_by_execution!), ::Any, ::Revise.CodeTrackingMethodInfo, ::Dict{Module,Array{Expr,1}}, ::Module, ::Expr) at C:\Users\username\.julia\packages\Revise\ND5ay\src\lowered.jl:47
[7] #methods_by_execution! at .\none:0 [inlined]
[8] #eval_with_signatures#61(::Bool, ::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::typeof(Revise.eval_with_signatures), ::Module, ::Expr) at C:\Users\username\.julia\packages\Revise\ND5ay\src\Revise.jl:344
[9] #eval_with_signatures at C:\Users\username\.julia\packages\Revise\ND5ay\src\Revise.jl:0 [inlined]
[10] #instantiate_sigs!#62(::Bool, ::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::typeof(Revise.instantiate_sigs!), ::OrderedCollections.OrderedDict{Module,OrderedCollections.OrderedDict{Revise.RelocatableExpr,Union{Nothing, Array{Any,1}}}}) at C:\Users\username\.julia\packages\Revise\ND5ay\src\Revise.jl:352
[11] instantiate_sigs! at C:\Users\username\.julia\packages\Revise\ND5ay\src\Revise.jl:349 [inlined]
[12] maybe_parse_from_cache!(::Revise.PkgData, ::String) at C:\Users\username\.julia\packages\Revise\ND5ay\src\pkgs.jl:224
[13] (::getfield(Revise, Symbol("##28#29")){String})() at C:\Users\username\.julia\packages\Revise\ND5ay\src\pkgs.jl:370
[14] with_logstate(::getfield(Revise, Symbol("##28#29")){String}, ::Base.CoreLogging.LogState) at .\logging.jl:395
[15] with_logger at .\logging.jl:491 [inlined]
[16] watch_manifest(::String) at C:\Users\username\.julia\packages\Revise\ND5ay\src\pkgs.jl:349
[17] (::Revise.Rescheduler{typeof(Revise.watch_manifest),Tuple{String}})() at C:\Users\username\.julia\packages\Revise\ND5ay\src\types.jl:235
while evaluating
import OrderedCollections: OrderedDict
in module Main.Parameters
Also:
julia> versioninfo()
Julia Version 1.2.0
Commit c6da87ff4b (2019-08-20 00:03 UTC)
Platform Info:
OS: Windows (x86_64-w64-mingw32)
CPU: Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-6.0.1 (ORCJIT, skylake)
Environment:
JULIA_NUM_THREADS = 4
if that helps
The problem seems to be that [d96e819e] ↓ Parameters v0.11.0 ⇒ v0.10.3
requires OrderedCollections. In other words, v0.10.3 is incompatible with Julia 1.2.0, but for some reason, it's installed. @mauro3, do you know if there's an easy way to tell the package manager that Parameters v0.10.3
is incompatible with Julia 1.2.0?
I suppose we could require Parameters v0.11.0. It's not quite right, but it's easiest.
Hmm, maybe we should make OrderedCollections compatible with 1.2?
@cstjean @mauro3 maybe the install should be made in a new enviroment
That's not a reasonable requirement for the user... I don't know if the issue has been resolved externally, but if not, I would still favour requiring parameters v0.11.0. Or leaving it as is; it's not our fault per se.