1
votes

So I currently have Scikit-Learn installed via anaconda for Python. However I wish to use Scikit-Learn in Julia on a Jupyter notebook, (see the link I am using) http://scikitlearnjl.readthedocs.io/en/latest/quickstart/.

I have ran:

Pkg.add("ScikitLearn")
Pkg.update()

which both ran perfectly and installed/updated. However when I run the next line of code (as the tutorial states):

using ScikitLearn
@sk_import linear_model: LogisticRegression

I get the error message:

INFO: Precompiling module ScikitLearn.
WARNING: Module Compat with uuid 32171850160196 is missing from the 
cache.
This may mean module Compat does not support precompilation but is 
imported by a module that does.
ERROR: LoadError: Declaring __precompile__(false) is not allowed in 
files that are being precompiled.
in require(::Symbol) at ./loading.jl:385
in require(::Symbol) at /Applications/Julia-
0.5.app/Contents/Resources/julia/lib/julia/sys.dylib:?
in include_from_node1(::String) at ./loading.jl:488
in include_from_node1(::String) at /Applications/Julia-
0.5.app/Contents/Resources/julia/lib/julia/sys.dylib:?
in macro expansion; at ./none:2 [inlined]
in anonymous at ./<missing>:?
in eval(::Module, ::Any) at ./boot.jl:234
in eval(::Module, ::Any) at /Applications/Julia-
0.5.app/Contents/Resources/julia/lib/julia/sys.dylib:?
in process_options(::Base.JLOptions) at ./client.jl:242
in _start() at ./client.jl:321
in _start() at /Applications/Julia-
0.5.app/Contents/Resources/julia/lib/julia/sys.dylib:?
while loading 
/Users/lawrence/.julia/v0.5/ScikitLearnBase/src/ScikitLearnBase.jl, in 
expression starting on line 5
ERROR: LoadError: LoadError: Failed to precompile ScikitLearnBase to 
/Users/lawrence/.julia/lib/v0.5/ScikitLearnBase.ji.
in compilecache(::String) at ./loading.jl:593
in require(::Symbol) at ./loading.jl:393
in require(::Symbol) at /Applications/Julia-
0.5.app/Contents/Resources/julia/lib/julia/sys.dylib:?
in include_from_node1(::String) at ./loading.jl:488
in include_from_node1(::String) at /Applications/Julia-
0.5.app/Contents/Resources/julia/lib/julia/sys.dylib:?
in include_from_node1(::String) at ./loading.jl:488
in include_from_node1(::String) at /Applications/Julia-
0.5.app/Contents/Resources/julia/lib/julia/sys.dylib:?
in macro expansion; at ./none:2 [inlined]
in anonymous at ./<missing>:?
in eval(::Module, ::Any) at ./boot.jl:234
in eval(::Module, ::Any) at /Applications/Julia-
0.5.app/Contents/Resources/julia/lib/julia/sys.dylib:?
in process_options(::Base.JLOptions) at ./client.jl:242
in _start() at ./client.jl:321
in _start() at /Applications/Julia-
0.5.app/Contents/Resources/julia/lib/julia/sys.dylib:?
while loading /Users/lawrence/.julia/v0.5/ScikitLearn/src/Skcore.jl, in 
expression starting on line 7
while loading 
/Users/lawrence/.julia/v0.5/ScikitLearn/src/ScikitLearn.jl, in 
expression starting on line 12
Failed to precompile ScikitLearn to 
/Users/lawrence/.julia/lib/v0.5/ScikitLearn.ji.

in compilecache(::String) at ./loading.jl:593
in require(::Symbol) at ./loading.jl:422
in require(::Symbol) at /Applications/Julia-
0.5.app/Contents/Resources/julia/lib/julia/sys.dylib:?

If anyone knows what I need to do to get the functions to work on Julia please do let me know. I really appreciate any help that anyone can give! Thank-you for your time.

1
have you tried starting a new session and just typing using ScikitLearn?Alexander Morley
Yes I had but it still did not work, however I have it working now after a computer restart. Thanks for your helpl.stewie

1 Answers

0
votes

So I found the code in the link worked after a restarting my laptop. After a restart when I ran the code Julia uninstalled numpy and then reinstalled numpy together with SciKit (despite saying it had already installed SciKit). There must of been some problem that numpy was causing with installation.