Using Pluto notebook as script -> activate_notebook_environment into the notebook ? #2572
Unanswered
aTrotier
asked this question in
Questions about using Pluto
Replies: 1 comment
-
|
I tried to share the notebook with somebody else and it seems to works except that i need to add at let
using Pluto, Pkg
if !isdefined(Main, :PlutoRunner)
notebook_path = replace(@__FILE__, r"#==#.*" => "")
activate_notebook_environment(notebook_path) # activate environement
Pkg.instantiate()
end
using CairoMakie, MRIReco, MRICoilSensitivities, QuantitativeMRI, MRIFiles,NIfTI
end |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I have a notebook that I want to both run as a Pluto notebook but also as a script with arguments from shell :
The issue is that the environment is not loaded. I can load it inside julia with
activate_notebook_environment("notebook.jl")It seems to work like that :
Do you have a better way ?
Beta Was this translation helpful? Give feedback.
All reactions