I found somewhere the following code to include in the startup.jl file:
import Pkg
package_names = ["DateFormats", "Statistics"]
for pkg in package_names
if Base.find_package(pkg) === nothing
Pkg.add(pkg)
end
@eval using $(Symbol(pkg))
end
The issue is that it would be nice to be able to pass list of package names to both Pkg.add() and using… separating by commas still requires manual entry. I have scripts that I move between machines so I am always adding and using… The solutions above are great… I would think that this functionality would be good to bad in Base
It feels like you should be instantiating a manifest rather than passing around vectors of package names? (doesn’t solve the using point though just to be clear)