Accessing package REPL mode in Jupyter (Julia 0.7)

question
jupyter
package-manager

#1

Is there an equivalent to hitting ] when using Julia 0.7 in Jupyter? In 0.6 it was possible to e.g. Pkg.add("PackageName") in Jupyter – is something equivalent still possible with Julia 0.7?


#2

I think using Pkg; Pkg.add("PackageName") will continue to work going forward. The package REPL is convenient but not required.

That said, it might just work if you do:

]add Packagename

in Jupyter. Does that work?


#3

I get syntax: unexpected "]" so no, it doesn’t seem to unfortunately.

I could use the method you describe, but it requires knowing the Pkg API beyond just the commands from the package REPL mode. For instance Pkg.add("Gaston#master") doesn’t work, one has to know that the equivalent is Pkg.checkout("Gaston") (at least I think it is!).


#4

You can run Pkg REPL commands with the pkg string macro:

using Pkg
pkg"add Foo"
pkg"rm Bar"