# Managing packages for multiple julia versions

**URL:** <https://discourse.julialang.org/t/managing-packages-for-multiple-julia-versions/33352>\
**Category:** New to Julia\
**Created:** [January 14, 2020, 5:05pm UTC](https://discourse.julialang.org/t/managing-packages-for-multiple-julia-versions/33352 "2020-01-14T17:05:29Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![BrucePBon](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/brucepbon/32/11936_2.png) [@BrucePBon](https://discourse.julialang.org/u/BrucePBon)\
**Post date:** [January 14, 2020, 5:05pm UTC](https://discourse.julialang.org/t/managing-packages-for-multiple-julia-versions/33352/1 "2020-01-14T17:05:29Z")

</div>

Hi there,

I was working with Julia 1.0 in the past and now want to move my code to Julia 1.3.1. So I have downloaded the Julia 1.3.1 binaries and set a symlink to the new julia executable. When I try “using IJulia” from Julia 1.3 it complains that it is not installed, although I installed it with "Pkg.add(“IJulia”) in Julia 1.0.

Given that it does not seem to recognize the packages in ~/.julia, I would like to take the chance to set a new directory for installing packages from Julia 1.3.1, just to keep things compartmentalized. Does this make practical sense? Or would this lead to useless duplication?

I think I could easily decide on a new directory for the new Julia 1.3.1 by setting JULIA\_DEPOT\_PATH to my newly desired directory. However, wouldn’t this mess up the package loading from my Julia 1.0 installation?

Alternatively, could I set Base.DEPOT\_PATH[1] = “/new/path” in Julia1.3.1/etc/julia/startup.jl to only affect the new version?

Thanks in advance

---

<div class="post-metadata">

**Author:** ![affans](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/affans/32/11911_2.png) [@affans](https://discourse.julialang.org/u/affans)\
**Post date:** [January 14, 2020, 5:14pm UTC](https://discourse.julialang.org/t/managing-packages-for-multiple-julia-versions/33352/2 "2020-01-14T17:14:38Z")

</div>

You should copy and paste the file `.\julia\environments\v1.0\Project.toml` to `.\julia\environments\v1.3\Project.toml`. I always do a `] up` as well after this step. This will only download packages that you need, preventing duplication.

---

<div class="post-metadata">

**Author:** ![BrucePBon](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/brucepbon/32/11936_2.png) [@BrucePBon](https://discourse.julialang.org/u/BrucePBon)\
**Post date:** [January 14, 2020, 5:31pm UTC](https://discourse.julialang.org/t/managing-packages-for-multiple-julia-versions/33352/3 "2020-01-14T17:31:05Z")

</div>

Quick question, ] up stands for Pkg.update() ?

---

<div class="post-metadata">

**Author:** ![Pbellive](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pbellive/32/3604_2.png) [@Pbellive](https://discourse.julialang.org/u/Pbellive)\
**Post date:** [January 14, 2020, 5:43pm UTC](https://discourse.julialang.org/t/managing-packages-for-multiple-julia-versions/33352/4 "2020-01-14T17:43:38Z")

</div>

Yes. It’s the package manager repl mode version of `Pkg.update()`

---

<div class="post-metadata">

**Author:** ![rdeits](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rdeits/32/286_2.png) [@rdeits](https://discourse.julialang.org/u/rdeits)\
**Post date:** [January 14, 2020, 5:49pm UTC](https://discourse.julialang.org/t/managing-packages-for-multiple-julia-versions/33352/5 "2020-01-14T17:49:34Z")

</div>

And just to add on, there’s no need for you to worry about creating a new directory to hold packages for different Julia versions. Each (minor) version of Julia, like 1.0, 1.1, 1.2, 1.3 has a separate package environment which can be found in `~/.julia/environments`. Any packages you install in 1.3 will only affect that environment, so they won’t change any behavior for 1.0.

---

<div class="post-metadata">

**Author:** ![BrucePBon](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/brucepbon/32/11936_2.png) [@BrucePBon](https://discourse.julialang.org/u/BrucePBon)\
**Post date:** [January 14, 2020, 5:56pm UTC](https://discourse.julialang.org/t/managing-packages-for-multiple-julia-versions/33352/6 "2020-01-14T17:56:06Z")

</div>

Thanks for the fast answers and the insights. I had the wrong approach about it, I will read the Pkg documentation to have a better grasp the Julia package system.

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [January 15, 2020, 9:27am UTC](https://discourse.julialang.org/t/managing-packages-for-multiple-julia-versions/33352/7 "2020-01-15T09:27:40Z")

</div>

I created a `v1` directory, and symlink everything to it:

```julia
$ ls -l ~/.julia/environments
total 4
lrwxrwxrwx 1 tamas tamas 4 Oct 7 2018 v0.7 -> v1.0
drwxrwxr-x 2 tamas tamas 4096 Aug 20 16:43 v1
lrwxrwxrwx 1 tamas tamas 2 Oct 8 2018 v1.0 -> v1
lrwxrwxrwx 1 tamas tamas 2 Oct 23 2018 v1.1 -> v1
lrwxrwxrwx 1 tamas tamas 2 Dec 13 2018 v1.2 -> v1
lrwxrwxrwx 1 tamas tamas 2 Apr 11 2019 v1.3 -> v1
lrwxrwxrwx 1 tamas tamas 2 Aug 20 16:43 v1.4 -> v1

```

This way I always have the same set of packages.
