How to check what other packages an installed package uses?

I have installed package X in my Julia environment. How can I check what other packages package X is using and what their versions are?

I believe that, in previous versions of Julia, I could use something like e.g. Pkg.dependencies("Optim") to check what package Optim.jl is using, but that doesn’t seem to work any longer (I use Julia 1.10).

You may try this:

using PkgDependency
PkgDependency.tree("Optim") 
1 Like

you can go to JuliaHub packages page, you find package X, and on the right down of the page you can see sections Dependencies and Dependents.

The status command in manifest-mode, i.e. pkg> status -m Optim, should work, but has been bugged for a while, see Pkg.jl#1989.

@matnbo Nice one. Didn’t occur to me as a solution.
@oheil This is a little gem
@fredrikekre Unfortunately, this seems to give me only the version of tha package and no dependencies (I am in Julia 1.10.1).

1 Like