# Why does Pluto crash on loading a certain package?

**URL:** <https://discourse.julialang.org/t/why-does-pluto-crash-on-loading-a-certain-package/111540>\
**Category:** New to Julia\
**Tags:** package, pluto\
**Created:** [March 12, 2024, 9:37pm UTC](https://discourse.julialang.org/t/why-does-pluto-crash-on-loading-a-certain-package/111540 "2024-03-12T21:37:51Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![user23804985096787](https://avatars.discourse-cdn.com/v4/letter/u/9fc29f/32.png) [@user23804985096787](https://discourse.julialang.org/u/user23804985096787)\
**Post date:** [March 12, 2024, 9:37pm UTC](https://discourse.julialang.org/t/why-does-pluto-crash-on-loading-a-certain-package/111540/1 "2024-03-12T21:37:51Z")

</div>

When I use the Julia REPL or load a regular julia file from the command line, I can do something like `using SomePackage` and it will load in a matter of seconds if the package is already installed. However, when I launch a Pluto instance then doing the same thing often adds a cloud icon next to the package name (implying that it isn’t actually installed?), and it seems to install a new instance of the package every time to a temporary folder, precompiles it (along with all dependencies) which means anything from several minutes to start a Pluto notebook, to just crashing the computer. I’m certain that I am doing something wrong here; is there a way to allow Pluto access to the packages already installed on my system? Or at least a way to limit memory/CPU usage for a given notebook file? I am using Linux if this is relevant.

The behaviour with which packages cause crashes is inconsistent, so perhaps I have some corrupted install, but I am not sure how to diagnose this without having to delete my whole ~/.julia directory.

Many thanks for any advice!

---

<div class="post-metadata">

**Author:** ![mkitti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkitti/32/12459_2.png) [@mkitti](https://discourse.julialang.org/u/mkitti)\
**Post date:** [March 12, 2024, 11:05pm UTC](https://discourse.julialang.org/t/why-does-pluto-crash-on-loading-a-certain-package/111540/2 "2024-03-12T23:05:29Z")

</div>

Are you loading a different version of the package?

As an alternative, you can activate a specific environment such as a shared environment rather than creating an environment within the notebook.

---

<div class="post-metadata">

**Author:** ![abraemer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/abraemer/32/51403_2.png) [@abraemer](https://discourse.julialang.org/u/abraemer)\
**Post date:** [March 13, 2024, 5:29am UTC](https://discourse.julialang.org/t/why-does-pluto-crash-on-loading-a-certain-package/111540/3 "2024-03-13T05:29:04Z")

</div>

Pluto.jl has its own package management to ensure reproducibility. However you can opt out of this by simply loading Pkg.jl and activating an environment. See here for more info and typical patterns:  
[https://plutojl.org/en/docs/packages/](https://plutojl.org/en/docs/packages/)  
[https://plutojl.org/en/docs/packages-advanced/](https://plutojl.org/en/docs/packages-advanced/)

---

<div class="post-metadata">

**Author:** ![user23804985096787](https://avatars.discourse-cdn.com/v4/letter/u/9fc29f/32.png) [@user23804985096787](https://discourse.julialang.org/u/user23804985096787)\
**Post date:** [April 2, 2024, 8:12pm UTC](https://discourse.julialang.org/t/why-does-pluto-crash-on-loading-a-certain-package/111540/4 "2024-04-02T20:12:56Z")

</div>

I’m not using different versions of packages as far as I’m aware, and everything should be up-to-date as this happens with packages I installed very recently. (side note: for comparison, when I use an interactive session the usual REPL, or Jupyter, the precompilation times are at most seconds, while with the exact same code in Pluto it is over 10 minutes.)

according to [Using a particular environment with Pluto](https://discourse.julialang.org/t/using-a-particular-environment-with-pluto/91967), if I want to force my notebook to use the default environment, I need to put it in a specific folder; is there a way to avoid this?

in `~/.julia/environments` I have the following directories:

- `__pluto_boot_v2_1.7.3`
- `v1.7`
- `__pluto_boot_v2_1.9.2`
- `v1.9`

I think only the last two are relevant here; v1.9 is my default environment. It seems like the pluto environments are also temporary and regenerated at each session? In the “status” tab on pluto, it seems that my projects are each saved in their own arbitrary environment, so the toml files are in (e.g.) `/tmp/jl_NhLgbE`. Is there any way to change this without losing the nice features of pluto?

---

<div class="post-metadata">

**Author:** ![j-fu](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/j-fu/32/11373_2.png) [@j-fu](https://discourse.julialang.org/u/j-fu)\
**Post date:** [April 2, 2024, 9:07pm UTC](https://discourse.julialang.org/t/why-does-pluto-crash-on-loading-a-certain-package/111540/5 "2024-04-02T21:07:12Z")

</div>

I think the safest way would be to use

```julia
Pkg.activate("v1.9",shared=true)

```

This activates `v1.9` in `.julia/environments` like a shared environment.

As for the pluto package manager, this acts on top of standard `Pkg`, and therefore upon notebook start, it extracts `Project.toml` and `Manifest.toml` to a temporary folder and handles them with the standard `Pkg` functions.
