Following the Github ‘Installing Pluto’ recommendation I get this error:
julia> import Pluto
│ Attempted to find missing packages in package registries but no registries are installed.
└ Use package mode to install a registry. `pkg> registry add` will install the default registries.
ERROR: ArgumentError: Package Pluto not found in current path.
- Run `import Pkg; Pkg.add("Pluto")` to install the Pluto package.
I did as the error suggested:
Julia> import Pkg; Pkg.add("Pluto")
I got this response:
Installing known registries into `~/.julia`
....etc....
Info Packages marked with ⌅ have new versions available but compatibility constraints restrict them from upgrading. To see why use `status --outdated -m`
(everything is a plus)
Precompiling project...
40 dependencies successfully precompiled in 243 seconds. 30 already precompiled.
Finally, I run:
julia> Pluto.run()
ERROR: UndefVarError: `Pluto` not defined in `Main`
Suggestion: check for spelling errors or missing imports.
Stacktrace:
[1] top-level scope
@ REPL[7]:1
Watching several videos of those installing Pluto, they all install fine.
I don’t know why my version isn’t installing.
That little blurb on the Github page is actually misleadingly cut short. The link to fuller instructions are a bit clearer on what’s going on, but it also assumes you learned Pkg first. Here’s the minimal knowledge you need:
Pkg.add is how you add a package to an environment that resolves compatibility with other packages in it, and it will also install and precompile versions that haven’t been installed in your local depot yet.
Only one environment is active at a time during a Julia session. By default you’re put in the Julia version’s main environment, but you can also use Pkg to make and activate different environments; rule of thumb is an environment with fewer packages has a lower risk of incompatibility, so only combine what you need to.
import or using (you’ll learn to prefer the latter most of the time) is how you make a package’s names available in the surrounding module/global scope, and it will also load that package for the first time in a Julia session if it wasn’t already.
Packages cannot be unloaded from a session or replaced by other versions, so you will have to manually start another session if you need to do that. That could be needed to properly switch to another environment, but Julia won’t do this for you because switching environments often don’t need it either. And the longer you stay in a session making more modest changes, the smoother things go; Pluto helps you do that by aggressively re-evaluating dependent cells.
Without numbers it’s not clear if that’s a problem, but it’s true that a full Julia process itself and Pluto are not light on resources. Interactivity and features need overhead. It’s very easy to run into situations where that overhead is much less than your program, so it’s usually fine.
When I only have 4GB of ram, and opening a second browser with Pluto fills up all of my available RAM, about 1GiB.
I’ll have to stick with mousepad for writing examples.
1 GiB of available RAM is indeed not much to work with, and Julia+Pluto+browser plausibly gets up there. How much if you just run julia and enter a REPL session? I get a little under 200MiB, gets >300MiB when I use Pkg commands, which still doesn’t leave much but can still handle modest programs and data.