Using package dependencies

To expand on @xiaodai’s correct response:

If you install package Foo (by doing ]add Foo say) and Foo depend on Bar, then Bar will be downloaded but not be added to the list of packages available for direct use in your current environment (these are the packages listed in the environment’s Project.toml file).

If you then want to be able to do using Bar in that same environment you still need to do ]add Bar but doing so won’t re-download Bar. The package manager will see that it has already been downloaded and just use the existing copy. So all the ]add Bar command does in this case is add the Bar package to your current environment’s Project.toml file.

5 Likes