Pluto not respecting project environment

I have been struggling to setup Pluto notebook with proper environment.

export JULIA_PROJECT=`pwd`
julia --project=. -e "using Pluto;"

# in Pluto
using Pkg

> Dict {}

While Pluto does offer to install packages afresh, I could not identify packages present in Project.toml.

I have also tried launching from julia REPL (which does work as expected). Does anyone one know how to setup Pluto for local environment properly?

I have also tried activation manually


But no avail.

Julia: 1.6
Pluto 0.15.1

1 Like

When you create a new notebook Pluto puts it with a temporary name under ~\.julia\pluto_notebooks
So if you simply tried to create a new notebook and do

	import Pkg

You would not be activating the path from where you started Julia, but the temporary pluto_notebook subfolder.

Try either saving the notebook inside your project folder, or giving the full path of your project to Pkg.activate().

All of this is due to the new integrate package manager that shipped with Pluto v0.15.0 that is described in more detail here:


It is best to use the built-in package management, then you just need to import / using external packages. Pluto automatically pins the versions for reproducibility.

You only need to manage Pkg environments on your own if you are using unregistered packages, local dev packages or specific package git branches. Instructions for these cases are given in the link posted by @disberd .


@lungben It would be nice to do that, however every time I start Pluto, it offers me to install everything, rather then using the local Project.toml. Is there anyway to use Pluto鈥檚 own package manager on already defined Project.toml

@disberd Thanks, it worked as expected.

The built-in package manager has the Project.toml and Manifest.toml integrated in the notebook.jl file. If the packages are already installed, Pluto does not re-install them, analogue to activating a Project.toml file (what is actually done under the hood).
To use an external Project.toml file see here: 馃巵 Package management 路 fonsp/Pluto.jl Wiki 路 GitHub
Combining both approaches is not possible because it would be ambiguous.


I am also struggling with this. I have this structure:

... Project.toml
... Manifest.toml
... notebooks/
...... notebook.jl
... src/
...... Db.jl

Inside notebooks/notebook.jl I try to import Db but I can鈥檛 get it to work. I tried adding

   import Pkg

and it does seem to install local packages but the using Db statement still doesn鈥檛 work inside the notebook. In the classical Julia REPL this works for me.

Have you tried Pkg.activate("..")?
If I remember correctly, the notebook dir is the current dir, and your Project.toml is one directory up.

Totally agree with the great advice given above. I also like using:


(included in the 鈥渟hared environment鈥 link @lungben shared above) if my notebooks are deeper down and I don鈥檛 want to manually keep track of how many ../../ I need to do. It鈥檚 my understanding that it has the same behavior as --project=@., which is super handy!


OK but for some reason the import Db doesn鈥檛 work still (package Db not found in current path).

Ok, are you doing something like this already in one of your cells?

	import Pkg
	import Db

I made a dummy package for Db.jl, and things seems to work as expected:

Here鈥檚 the corresponding repo for it, just to make sure I am on the same page as you

1 Like

OK your code works while mine doesn鈥檛. I have to analyze this deeper then, thank you!

Ah OK I see what鈥檚 wrong. My package name is Analyzer while in src I have multiple files, Analyzer.jl, Db.jl etc. So import Analyzer works while import Db doesn鈥檛. Same in your project. If I add src/Db2.jl then using Db2 won鈥檛 work.

Seems that adding include("Db2.jl") inside Db.jl works. Now I can run