Determine version of a specific package

EDIT: For Julia version 1.1+

Use the Pkg REPL notation:

] status                        # Show every installed package version
] status pkgName                # Show the specific version of the package
] status pkgName1 pkgName2      # Show the named packages. You can continue the list.

The ] enters the Pkg REPL, so you basically write status ...

So in your case, write after entering the Pkg REPL:

status DataFrame

Or use the object-oriented approach (NB: Here you don’t enter the Pkg REPL, i.e. DON’T use ]:

Pkg.status("DataFrame")

EDIT: For Julia version 1.0

Pkg.installed seems to have “regressed” with the new package system. There are no arguments for Pkg.installed. So, the OP’s original method seems to be about the best you can do at the moment.

pkgs = Pkg.installed();
pkgs["Datetime"]

EDIT: For Julia version upto 0.6.4

You can pass a string to Pkg.installed. For example:

pkgs = Pkg.installed("JuMP")

I often check available calling arguments with methods. For example:

julia> methods(Pkg.installed)
# 2 methods for generic function "installed":
installed() at pkg/pkg.jl:122
installed(pkg::AbstractString) at pkg/pkg.jl:129

or

julia> Pkg.installed |> methods
# 2 methods for generic function "installed":
installed() at pkg/pkg.jl:122
installed(pkg::AbstractString) at pkg/pkg.jl:129

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)