# How to handle dependencies?

**URL:** <https://discourse.julialang.org/t/how-to-handle-dependencies/46849>\
**Category:** New to Julia\
**Created:** [September 18, 2020, 2:21pm UTC](https://discourse.julialang.org/t/how-to-handle-dependencies/46849 "2020-09-18T14:21:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pascal-mueller](https://avatars.discourse-cdn.com/v4/letter/p/e47774/32.png) [@pascal-mueller](https://discourse.julialang.org/u/pascal-mueller)\
**Post date:** [September 18, 2020, 2:21pm UTC](https://discourse.julialang.org/t/how-to-handle-dependencies/46849/1 "2020-09-18T14:21:27Z")

</div>

Hi,

so imagen I have a file at /home/pascal/projects/foo/main.jl and in that file I want to create code that plots some kind of histogram. For that, I want to use `histogram()` from the `DistPlots` package. I have a REPL session running in a terminal and do `using Revise` and `includet("main.jl")` to start watching the main.jl file.

Now it seems that I have to do `using DistPlots` inside the REPL session and also make use I don’t have any `using` in main.jl to be able to actually get the code running.

So how exactly do I handle dependencies like DistPlots? Can I somehow declare them in the file like one would do in Python, C, C++ etc.? Do I maybe need to first install them locally like one would do it for NodeJS? Like what’s the philosophy Julia is following here?

And as a side question (which also might be a nice input to my confusion here): How would I distribute my code once I’m done?

---

<div class="post-metadata">

**Author:** ![pdeffebach](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pdeffebach/32/10320_2.png) [@pdeffebach](https://discourse.julialang.org/u/pdeffebach)\
**Post date:** [September 18, 2020, 2:41pm UTC](https://discourse.julialang.org/t/how-to-handle-dependencies/46849/2 "2020-09-18T14:41:24Z")

</div>

You are in luck, Julia has _excellent_ dependency management. You should read the Pkg documentation [here](https://docs.julialang.org/en/v1/stdlib/Pkg/). Let us know if you have more questions after having read it. It’s a bit complicated but its very robust.

---

<div class="post-metadata">

**Author:** ![pascal-mueller](https://avatars.discourse-cdn.com/v4/letter/p/e47774/32.png) [@pascal-mueller](https://discourse.julialang.org/u/pascal-mueller)\
**Post date:** [September 18, 2020, 4:09pm UTC](https://discourse.julialang.org/t/how-to-handle-dependencies/46849/3 "2020-09-18T16:09:23Z")

</div>

I read through it and also discussed it in the slack. I actually run into a problem with Revise which added to my confusion. I think I’m good now. Thanks
