# Is it possible to select the Julia version in an environmet?

**URL:** <https://discourse.julialang.org/t/is-it-possible-to-select-the-julia-version-in-an-environmet/37567>\
**Category:** General Usage\
**Tags:** question\
**Created:** [April 14, 2020, 2:50pm UTC](https://discourse.julialang.org/t/is-it-possible-to-select-the-julia-version-in-an-environmet/37567 "2020-04-14T14:50:21Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![angelv](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/angelv/32/133_2.png) [@angelv](https://discourse.julialang.org/u/angelv)\
**Post date:** [April 14, 2020, 2:50pm UTC](https://discourse.julialang.org/t/is-it-possible-to-select-the-julia-version-in-an-environmet/37567/1 "2020-04-14T14:50:21Z")

</div>

Hi,

I’m starting to get familiar with environments while following the course on Parallel Computing with Julia in JuliaAcademy. The repository for that course comes with Project.toml and Manifest.toml files to specify the particular versions needed for that environment. All OK with that, but I was just wondering if it is also possible to specify the Julia version itself? (I don’t have any need for it right now, I’m using 1.4.0 and all works OK, but I can imagine that things will start to break at a later Julia version, so is it also possible to specify the version of Julia needed?)

Many thanks,  
AdV

---

<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:** [April 14, 2020, 3:15pm UTC](https://discourse.julialang.org/t/is-it-possible-to-select-the-julia-version-in-an-environmet/37567/2 "2020-04-14T15:15:29Z")

</div>

> [@angelv](#):
>
> specify the version of Julia needed?

The [compatibility](https://julialang.github.io/Pkg.jl/dev/compatibility/) section of the `Project.toml` can be used to specify it (in fact, it is requirement to do so for the general registry).

---

<div class="post-metadata">

**Author:** ![angelv](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/angelv/32/133_2.png) [@angelv](https://discourse.julialang.org/u/angelv)\
**Post date:** [April 14, 2020, 3:20pm UTC](https://discourse.julialang.org/t/is-it-possible-to-select-the-julia-version-in-an-environmet/37567/3 "2020-04-14T15:20:50Z")

</div>

I see, thanks.

In the case of the environment I was looking at, there is no compatibility section. I assume then that every package includes information about which Julia version it requires (perhaps something like +1.0), and if the Julia version I’m running does not meet the requirements, then the environment cannot get activated?

And what happens if the compatibility section says I need another version of Julia? It simply stops and informs about this requirement or it automagically does something cleverer?

Thanks  
AdV

---

<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:** [April 14, 2020, 3:27pm UTC](https://discourse.julialang.org/t/is-it-possible-to-select-the-julia-version-in-an-environmet/37567/4 "2020-04-14T15:27:25Z")

</div>

Surprisingly, it just works:

```julia
julia> VERSION
v"1.4.0"

shell> cat Foo/Project.toml
name = "Foo"
uuid = "7b91d50f-2228-4ab2-8171-0fe17056363f"
authors = ["Tamas K. Papp <tkpapp@gmail.com>"]
version = "0.1.0"

[compat]
julia = "2"

(@v1) pkg> activate ./Foo
 Activating environment at `/tmp/Foo/Project.toml`

```

so I am assuming it is not enforced at activation time.

I could not find an existing issue.

---

<div class="post-metadata">

**Author:** ![angelv](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/angelv/32/133_2.png) [@angelv](https://discourse.julialang.org/u/angelv)\
**Post date:** [April 14, 2020, 4:52pm UTC](https://discourse.julialang.org/t/is-it-possible-to-select-the-julia-version-in-an-environmet/37567/5 "2020-04-14T16:52:14Z")

</div>

OK, many thanks. Don’t expect this to bother me for the time being, but just to understand a bit more how environments were working.
