Reabo
Reabo

Reputation: 87

Julia: Cannot install "Pkg" package in Julia

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.

Upvotes: 1

Views: 495

Answers (1)

carstenbauer
carstenbauer

Reputation: 10117

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.

Upvotes: 4

Related Questions