JuliaAcademy / JuliaAcademyData.jl

Supplementary materials for Julia Academy courses
MIT License
8 stars 13 forks source link

Issues with Foundations of machine learning Environment #4

Closed ankit48365 closed 3 years ago

ankit48365 commented 4 years ago

I will first share the issues I face and then what I am trying and what issues I am facing, please follow all the steps:

  1. Working on Julia academy - Foundation of Machine Learning (https://juliaacademy.com/courses/enrolled/392870)

  2. I am using the "Foundations of machine learning" environment as suggested in the beginning of the course.

  3. All goes fine until I issue the below command - I get this warning

using Plots;

┌ Warning: Error requiring Juno from PlotThemes: │ LoadError: MethodError: no method matching hex(::UInt32, ::Int64, ::Bool) │ You may have intended to import Base.hex │ Stacktrace: │ [1] (::PlotThemes.var"#22#28")(::Pair{String,UInt32}) at .\none:0 │ [2] iterate at .\generator.jl:47 [inlined] │ [3] _all at .\reduce.jl:819 [inlined] │ [4] all at .\reduce.jl:815 [inlined] │ [5] Dict(::Base.Generator{Dict{String,UInt32},PlotThemes.var"#22#28"}) at .\dict.jl:130
│ [6] top-level scope at C:\Users\XXXX.julia\packages\PlotThemes\VNU1I\src\juno_smart.jl:5
│ [7] include(::Module, ::String) at .\Base.jl:377 │ [8] include(::String) at C:\Users\xxxxx.julia\packages\PlotThemes\VNU1I\src\PlotThemes.jl:3 │ [9] top-level scope at C:\Users\xxxx\OneDrive\Julia\JuliaWork\AppleBanana.jl:36 │ [10] eval at .\boot.jl:331 [inlined] │ [11] eval at C:\Users\xxxx.julia\packages\PlotThemes\VNU1I\src\PlotThemes.jl:3 [inlined] │ [12] (::PlotThemes.var"#18#21")() at C:\Users\xxxx.julia\packages\Requires\qy6zC\src\require.jl:85 │ [13] err(::Any, ::Module, ::String) at C:\Users\xxxx.julia\packages\Requires\qy6zC\src\require.jl:42 │ [14] (::PlotThemes.var"#17#20")() at C:\Users\xxxx.julia\packages\Requires\qy6zC\src\require.jl:84 │ [15] withpath(::Any, ::String) at C:\Users\xxxx.julia\packages\Requires\qy6zC\src\require.jl:32 │ [16] (::PlotThemes.var"#16#19")() at C:\Users\xxxx.julia\packages\Requires\qy6zC\src\require.jl:83 │ [17] listenpkg(::Any, ::Base.PkgId) at C:\Users\xxxx.julia\packages\Requires\qy6zC\src\require.jl:15 │ [18] macro expansion at C:\Users\xxxx.julia\packages\Requires\qy6zC\src\require.jl:81 [inlined] │ [19] init() at C:\Users\xxxx.julia\packages\PlotThemes\VNU1I\src\PlotThemes.jl:63 │ [20] _include_from_serialized(::String, ::Array{Any,1}) at .\loading.jl:697 │ [21] _require_search_from_serialized(::Base.PkgId, ::String) at .\loading.jl:781 │ [22] _tryrequire_from_serialized(::Base.PkgId, ::UInt64, ::String) at .\loading.jl:712 │ [23] _require_search_from_serialized(::Base.PkgId, ::String) at .\loading.jl:770 │ [24] _require(::Base.PkgId) at .\loading.jl:1006 │ [25] require(::Base.PkgId) at .\loading.jl:927 │ [26] require(::Module, ::Symbol) at .\loading.jl:922 │ [27] include_string(::Module, ::String, ::String) at .\loading.jl:1080 │ [28] include_string(::Module, ::String, ::String, ::Int64) at C:\Users\xxxx.julia\packages\CodeTools\kosGY\src\eval.jl:30 │ [29] (::Atom.var"#188#192"{String,Int64,String,Bool})() at C:\Users\xxxx.julia\packages\Atom\wlPiw\src\eval.jl:111 │ [30] withpath(::Atom.var"#188#192"{String,Int64,String,Bool}, ::String) at C:\Users\xxxx.julia\packages\CodeTools\kosGY\src\utils.jl:30 │ [31] withpath(::Function, ::String) at C:\Users\xxxx.julia\packages\Atom\wlPiw\src\eval.jl:9 │ [32] #187 at C:\Users\xxxx.julia\packages\Atom\wlPiw\src\eval.jl:110 [inlined] │ [33] with_logstate(::Atom.var"#187#191"{String,Int64,String,Bool}, ::Base.CoreLogging.LogState) at .\logging.jl:398 │ [34] with_logger at .\logging.jl:505 [inlined] │ [35] #186 at C:\Users\xxxx.julia\packages\Atom\wlPiw\src\eval.jl:109 [inlined] │ [36] hideprompt(::Atom.var"#186#190"{String,Int64,String,Bool}) at C:\Users\xxxx.julia\packages\Atom\wlPiw\src\repl.jl:140 │ [37] macro expansion at C:\Users\xxxx.julia\packages\Atom\wlPiw\src\eval.jl:108 [inlined] │ [38] macro expansion at C:\Users\xxxx.julia\packages\Media\ItEPc\src\dynamic.jl:24 [inlined] │ [39] eval(::String, ::Int64, ::String, ::String, ::Bool) at C:\Users\xxxx.julia\packages\Atom\wlPiw\src\eval.jl:105 │ [40] macro expansion at C:\Users\xxxx.julia\packages\Atom\wlPiw\src\eval.jl:39 [inlined] │ [41] (::Atom.var"#172#173")() at .\task.jl:358 │ in expression starting at C:\Users\xxxxx.julia\packages\PlotThemes\VNU1I\src\juno_smart.jl:3 └ @ Requires C:\Users\xxxx.julia\packages\Requires\qy6zC\src\require.jl:44

  1. Then this error comes when I issue the next command plot(x -> σ(x, w, b), xlim=(-0,1), ylim=(-0.1,1.1), label="model", legend=:topleft, lw=3)

could not load library "libGR.dll" The specified module could not be found. setcharheight at GR.jl:1263 [inlined] gr_set_font(::Plots.Font; halign::Symbol, valign::Symbol, color::RGB{Normed{UInt8,8}}, rotation::Int64) at gr.jl:386 (::Plots.var"#gr_set_font##kw")(::NamedTuple{(:halign, :valign, :rotation),Tuple{Symbol,Symbol,Int64}}, ::typeof(Plots.gr_set_font), ::Plots.Font) at gr.jl:385 gr_set_xticks_font(::Plots.Subplot{Plots.GRBackend}) at gr.jl:723 _update_min_padding!(::Plots.Subplot{Plots.GRBackend}) at gr.jl:904 iterate at generator.jl:47 [inlined] _collect(::Array{AbstractLayout,2}, ::Base.Generator{Array{AbstractLayout,2},typeof(Plots._update_min_padding!)}, ::Base.EltypeUnknown, ::Base.HasShape{2}) at array.jl:678 collect_similar(::Array{AbstractLayout,2}, ::Base.Generator{Array{AbstractLayout,2},typeof(Plots._update_min_padding!)}) at array.jl:607 map(::Function, ::Array{AbstractLayout,2}) at abstractarray.jl:2072 _update_min_padding!(::Plots.GridLayout) at layouts.jl:310 prepare_output(::Plots.Plot{Plots.GRBackend}) at plot.jl:261 showjuno(::IOContext{Base.GenericIOBuffer{Array{UInt8,1}}}, ::MIME{Symbol("text/html")}, ::Plots.Plot{Plots.GRBackend}) at output.jl:247 show(::IOContext{Base.GenericIOBuffer{Array{UInt8,1}}}, ::MIME{Symbol("application/prs.juno.plotpane+html")}, ::Plots.Plot{Plots.GRBackend}) at output.jl:205 show(::IOContext{Base.GenericIOBuffer{Array{UInt8,1}}}, ::String, ::Plots.Plot{Plots.GRBackend}) at multimedia.jl:109 displayinplotpane(::Plots.Plot{Plots.GRBackend}) at showdisplay.jl:51 displayandrender(::Plots.Plot{Plots.GRBackend}) at showdisplay.jl:131 (::Atom.var"#189#193"{String})() at eval.jl:126

invokelatest#1 at essentials.jl:712 [inlined]

invokelatest at essentials.jl:711 [inlined] macro expansion at dynamic.jl:24 [inlined] eval(::String, ::Int64, ::String, ::String, ::Bool) at eval.jl:105 macro expansion at eval.jl:39 [inlined] (::Atom.var"#172#173")() at task.jl:358

  1. When I try to add anything into the 'Foundation of Machin......' environment I get the below permission error

• add Plots#master • add GR

ERROR: SystemError: opening file "C:\Users\XXXX\.julia\packages\JuliaAcademyData\1to3l\courses\Foundations of machine learning\Project.toml": Permission denied

  1. Below is the show status of v1.4 environment and Foundation of Machin...... (notice The later one doesn't even have GR and i cant add to it aswell)

image

ankit48365 commented 4 years ago

@logankilpatrick @mbauman Hey Guys !! Is there anything you can do to resolve my problem !! will appreciate your help !!!

YusufMohammedUH commented 4 years ago

You can solve the permission issue by changing the permission for the given file. I encountered the same problem and was able to solve this on Ubuntu by doing sudo chmod -R u=rwx ~/.julia/packages/JuliaAcademyData/1to3l/courses/Foundations\ of\ machine\ learning/Project.toml.

I guess you could just use u=rw.

You should additionally import additional libraries with using Images;using ImageMagick;using FFTW In order to avoid additional isssues.

logankilpatrick commented 3 years ago

Hey, I just updated the notebooks for this. Should be all good now. Sorry for the delay!