When is it necessary to explicitly build a package?

The subject says it -

usually Pkg.add(“X”) and using X is enough.

When/why would we want to call Pkg.build?

1 Like

As far as I understand the build step is being run automatically for you when you add the package. You usually don’t have to think about it. I guess the build step is usually related to external (non-Julia) dependencies that some packages need.
Sometimes you will want to re-run the build step in order to point a package to a dependency in a different location than the one with which it was originally installed (e.g. python installation for PyCall / PyPlot ).
In some cases (which are quite rare for me) the package manager will complain when you try to add some package A due to some problem with installed package B and it will tell you to try to build package B again.