# Is it possible to "using" or "import” specific version of a registered package

**URL:** <https://discourse.julialang.org/t/is-it-possible-to-using-or-import-specific-version-of-a-registered-package/115902>\
**Category:** New to Julia\
**Created:** [June 20, 2024, 4:31am UTC](https://discourse.julialang.org/t/is-it-possible-to-using-or-import-specific-version-of-a-registered-package/115902 "2024-06-20T04:31:43Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![lionisxn](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lionisxn/32/37989_2.png) [@lionisxn](https://discourse.julialang.org/u/lionisxn)\
**Post date:** [June 20, 2024, 4:31am UTC](https://discourse.julialang.org/t/is-it-possible-to-using-or-import-specific-version-of-a-registered-package/115902/1 "2024-06-20T04:31:43Z")

</div>

I just want to know whether it is possible to “using” or "import” the latest version of a registered package of which the version installed in a local machine is limited to the obsolescence by other installed packages.

---

<div class="post-metadata">

**Author:** ![paalon](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/paalon/32/5784_2.png) [@paalon](https://discourse.julialang.org/u/paalon)\
**Post date:** [June 20, 2024, 5:07am UTC](https://discourse.julialang.org/t/is-it-possible-to-using-or-import-specific-version-of-a-registered-package/115902/2 "2024-06-20T05:07:13Z")

</div>

For detail control of your project’s dependency, you should read [Pkg · The Julia Language](https://docs.julialang.org/en/v1.10/stdlib/Pkg/) and [1. Introduction · Pkg.jl](https://pkgdocs.julialang.org/v1/).

---

<div class="post-metadata">

**Author:** ![paalon](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/paalon/32/5784_2.png) [@paalon](https://discourse.julialang.org/u/paalon)\
**Post date:** [June 20, 2024, 5:12am UTC](https://discourse.julialang.org/t/is-it-possible-to-using-or-import-specific-version-of-a-registered-package/115902/3 "2024-06-20T05:12:30Z")

</div>

Are you using some package which require outdated package? I’m not good at English but your question sounds not clear.

---

<div class="post-metadata">

**Author:** ![lionisxn](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lionisxn/32/37989_2.png) [@lionisxn](https://discourse.julialang.org/u/lionisxn)\
**Post date:** [June 20, 2024, 5:33am UTC](https://discourse.julialang.org/t/is-it-possible-to-using-or-import-specific-version-of-a-registered-package/115902/4 "2024-06-20T05:33:52Z")

</div>

Yes, I have several packages with outdated versions, and unable to upgrade, due to dependencies by other packages. I think it might be convenient to call for the latest version via a syntax like “import package@1.0.0”

---

<div class="post-metadata">

**Author:** ![vettert](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/vettert/32/30599_2.png) [@vettert](https://discourse.julialang.org/u/vettert)\
**Post date:** [June 20, 2024, 6:00am UTC](https://discourse.julialang.org/t/is-it-possible-to-using-or-import-specific-version-of-a-registered-package/115902/5 "2024-06-20T06:00:03Z")

</div>

You cannot force install a package version that is incompatible with other packages in your environment. That’s the whole point of compatibility entries.

If package B is blocking higher versions of package A, the only way of upgrading package A is to remove package B from your environment (or resolving the incompatibility, meaning a PR to package B).

---

<div class="post-metadata">

**Author:** ![lionisxn](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lionisxn/32/37989_2.png) [@lionisxn](https://discourse.julialang.org/u/lionisxn)\
**Post date:** [June 20, 2024, 6:18am UTC](https://discourse.julialang.org/t/is-it-possible-to-using-or-import-specific-version-of-a-registered-package/115902/6 "2024-06-20T06:18:39Z")

</div>

Well, I think it could be much better that Julia can identify the latest version on demand. It seem not “impartial” to compellingly use an outdated package only limited by a or several specific ones

---

<div class="post-metadata">

**Author:** ![hexaeder](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/hexaeder/32/24403_2.png) [@hexaeder](https://discourse.julialang.org/u/hexaeder)\
**Post date:** [June 20, 2024, 7:07am UTC](https://discourse.julialang.org/t/is-it-possible-to-using-or-import-specific-version-of-a-registered-package/115902/7 "2024-06-20T07:07:03Z")

</div>

Very often, the reason why this happens is related to a cluttered global environment. In Julia, you can never have two different versions of the same package _loaded_ – however it is possible to have multiple versions of the same package _installed_.

You normally create local environments for your different projects. For more information, see [this short introduction](https://modernjuliaworkflows.github.io/writing/#environments) or the [official docs](https://pkgdocs.julialang.org/v1/environments/).  
In each environment, you can install the latest compatible version using `] add Package`, a specific version `] add Package@v1.1` or even a specific tag or branch (i.e. a a non merged PR for some package) `] add Package#pr-branch`.

---

<div class="post-metadata">

**Author:** ![Karajan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/karajan/32/8545_2.png) [@Karajan](https://discourse.julialang.org/u/Karajan)\
**Post date:** [June 20, 2024, 7:09am UTC](https://discourse.julialang.org/t/is-it-possible-to-using-or-import-specific-version-of-a-registered-package/115902/8 "2024-06-20T07:09:49Z")

</div>

> [@lionisxn](#):
>
> It seem not “impartial” to compellingly use an outdated package only limited by a or several specific ones

The reason Julia won’t let you do that is because the developers of these packages figured out that things would break if you did that – that’s why they put the restrictions (called “compat” for compatability) on the installable versions.

If you want to get around that different environments, as explained above, could help (that way the versions which clash don’t get in contact).

---

<div class="post-metadata">

**Author:** ![lionisxn](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lionisxn/32/37989_2.png) [@lionisxn](https://discourse.julialang.org/u/lionisxn)\
**Post date:** [June 20, 2024, 7:54am UTC](https://discourse.julialang.org/t/is-it-possible-to-using-or-import-specific-version-of-a-registered-package/115902/9 "2024-06-20T07:54:27Z")

</div>

Got it, that solves my problem!
