Ok, well I still think that printed output and stacktraces are easier to read when they are in code blocks than when they are presented as screenshots.
Noted. Thank you for the resource
and I will consider this for future
posts.
Don’t
pkg> resolve
and
pkg> instantiate
mitigate potential package
versioning issues?
No, I think you misunderstood my point. Any command you type after pkg>
is run in the environment pkg
, and therefore will not affect the Pluto notebook, which generates its own environment. E.g. if you did
pkg> add DataFrames@1.0
in the REPL, then
julia> using Pluto; Pluto.run()
and then put
using DataFrames
at the top of your notebook, Pluto will automatically install the latest DataFrames version (1.2) in your notebook environment, and you will be using that version in the notebook, not the version in your pkg
environment from which you started Pluto.
Okay – thanks for clarifying.
So there is no benefit to adding
the packages in the REPL if one
is using Pluto and calling the
packages with ‘using ’?
Correct. You can do using Pkg, Pkg.activate("/path/to/pkg")
in your Pluto notebook to manage your own environment and disable Pluto’s built-in package manager, but if you don’t do that there’s no point doing any package operations in the REPL prior to starting Pluto (except for changing the version of Pluto itself, obviously).