# Is there any way to avoid reimporting all deps in Pluto.jl notebook?

**URL:** <https://discourse.julialang.org/t/is-there-any-way-to-avoid-reimporting-all-deps-in-pluto-jl-notebook/97803>\
**Category:** General Usage\
**Created:** [April 23, 2023, 4:30am UTC](https://discourse.julialang.org/t/is-there-any-way-to-avoid-reimporting-all-deps-in-pluto-jl-notebook/97803 "2023-04-23T04:30:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bryaan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bryaan/32/36858_2.png) [@bryaan](https://discourse.julialang.org/u/bryaan)\
**Post date:** [April 23, 2023, 4:30am UTC](https://discourse.julialang.org/t/is-there-any-way-to-avoid-reimporting-all-deps-in-pluto-jl-notebook/97803/1 "2023-04-23T04:30:00Z")

</div>

I’m getting started with Pluto.jl, my module Tibra.jl uses many external libraries. Pluto is asking me to import them one by one. Is there any way to avoid this?

I ran it from my activated project but all that seems to do is set a relative path as Pluto uses its own julia project.

```julia
begin
    # Having to reimport all of these even though my notebook code doesn't use them
	using Dates
	using OrdinaryDiffEq
	using Plots
	using DSP
    using Reexport
	
	include("../src/Tibra.jl")
	using .Tibra
end

```

---

<div class="post-metadata">

**Author:** ![SteffenPL](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/steffenpl/32/206270_2.png) [@SteffenPL](https://discourse.julialang.org/u/SteffenPL)\
**Post date:** [April 23, 2023, 4:51am UTC](https://discourse.julialang.org/t/is-there-any-way-to-avoid-reimporting-all-deps-in-pluto-jl-notebook/97803/2 "2023-04-23T04:51:21Z")

</div>

Per default, Pluto automatically creates a new environment for each notebook and manages package dependencies for you, which is useful for beginners and for sharing notebooks. However, that’s why there is the restriction you face.

To avoid the automatic package managing by Pluto, you can use the advanced package mode by activating your own environment. Then Pluto behaves just like any other Julia environment.

See: [🎁 Package management · fonsp/Pluto.jl Wiki · GitHub](https://github.com/fonsp/Pluto.jl/wiki/%F0%9F%8E%81-Package-management#advanced-set-up-an-environment-with-pkgactivate)

---

<div class="post-metadata">

**Author:** ![kellertuer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kellertuer/32/220707_2.png) [@kellertuer](https://discourse.julialang.org/u/kellertuer)\
**Post date:** [April 23, 2023, 8:53am UTC](https://discourse.julialang.org/t/is-there-any-way-to-avoid-reimporting-all-deps-in-pluto-jl-notebook/97803/3 "2023-04-23T08:53:07Z")

</div>

If I read your post correctly, then you are not specifically `using` the things you write but you need them in your environment (since Tibra uses them?)

If you are in a folder and want to use an environment you could start the cell you wrote with

```julia
using Pkg;
Pkg.activate(".")

```

this deactivates the automatic environment and loads the environment in the current folder you started Pluto from.

_edit:_ Note that this destroys the reproducibility Pluto is aiming for with its automatic way to handle packages, so you can not easily share your notebook (standalone) with someone.
