logo

How to Install a Specific Version of a Package in Julia 📂Julia

How to Install a Specific Version of a Package in Julia

Guide 1

(@v1.6) pkg> status JuMP
      Status `C:\Users\rmsms\.julia\environments\v1.6\Project.toml`
  [4076af6c] JuMP v0.20.0

By pressing the ] key in the REPL, you enter the package mode. For example, if you want to upgrade a package version from v0.20.0 to v0.21, you can do so by appending @x.yy to the package as follows.

(@v1.6) pkg> add JuMP@0.21
   Resolving package versions...
   ...

(@v1.6) pkg> status JuMP
      Status `C:\Users\rmsms\.julia\environments\v1.6\Project.toml`
  [4076af6c] JuMP v0.21.4

If you check the version again, you can verify that the package version has been successfully updated.

Environment

  • OS: Windows
  • julia: v1.6.2