1
votes

I have a problem with installing the "Pkg" package in Julia. The following is the error I get after using Pkg.add("Pkg"):

unknown package Pkg
macro expansion at ./pkg/entry.jl:53 [inlined]
(::Base.Pkg.Entry.##1#3{String,Base.Pkg.Types.VersionSet})() at ./task.jl:335

Stacktrace:
 [1] sync_end() at ./task.jl:287
 [2] macro expansion at ./task.jl:303 [inlined]
 [3] add(::String, ::Base.Pkg.Types.VersionSet) at ./pkg/entry.jl:51
 [4] (::Base.Pkg.Dir.##4#7{Array{Any,1},Base.Pkg.Entry.#add,Tuple{String}})() at ./pkg/dir.jl:36
 [5] cd(::Base.Pkg.Dir.##4#7{Array{Any,1},Base.Pkg.Entry.#add,Tuple{String}}, ::String) at ./file.jl:70
 [6] #cd#1(::Array{Any,1}, ::Function, ::Function, ::String, ::Vararg{String,N} where N) at ./pkg/dir.jl:36
 [7] add(::String) at ./pkg/pkg.jl:117
 [8] include_string(::String, ::String) at ./loading.jl:522

Also, it would be great if you tell me how I can find the Package directory of Julia in my mac. I am using Jupyter.

1
In Julia 1.0.0, the first one I have used, pressing the ] key in the Julia REPL puts you into the package manager mode. You may have already known that, but if not, that is a handy way to just (v1.0) pkg> add PackageName - Julia Learner

1 Answers

4
votes

From Julia v0. 7 on, Pkg is a standard library (a package that ships with julia) and doesn't need to be installed. Just do using Pkg and you are good to go.

To your second question, by default you can find everything Julia related in your home folder under ~/.julia.