Julia: how I "fix" a package at a particular version?

julia download
julia something
julia tutorial
julia packages
julia documentation
julia for data science
julia ide
think julia pdf

How do I "fix" a package at particular version? in Julia?

So that we don't have to update a package if it breaks existing code.

After v1.0

My original answer to this question is now syntactically outdated. @RikH has provided an answer with the latest syntax. For additional info beyond that answer regarding the syntactical differences between working in the REPL package mode or the regular REPL, type using Pkg, and then ?Pkg.PackageSpec at the REPL to see examples of the ways in which package versions/commits etc can be referenced

Before v1.0

The process for doing this is described pretty clearly in the official docs. However, I suspect this question will be searched for frequently, so perhaps it doesn't hurt to double up.

Packages can be pinned to a specific version using Pkg.pin. The single input method will pin the package to the current version:

julia> Pkg.pin("DependentBootstrap")
INFO: Creating DependentBootstrap branch pinned.b32df31a.tmp

julia> Pkg.status()
13 required packages:
...
 - DependentBootstrap            0.1.0              pinned.b32df31a.tmp
 - ForecastEval                  0.1.0

where you'll note the package has been pinned to a specific git commit.

You can pin to a specific tagged version of a particular package using a second argument:

julia> Pkg.pin("DependentBootstrap", v"0.0.1")
INFO: Creating DependentBootstrap branch pinned.996d3c22.tmp
INFO: Downgrading ForecastEval: v0.1.0 => v0.0.1
INFO: Building SpecialFunctions
INFO: Building Rmath

julia> Pkg.status()
13 required packages:
...
 - DependentBootstrap            0.0.1              pinned.996d3c22.tmp
 - ForecastEval                  0.0.1

Notice that the pinning operation automatically downgraded ForecastEval in order to satisfy version requirements.

You can get the package back to the latest stable version using Pkg.free:

julia> Pkg.free("DependentBootstrap")
INFO: Freeing DependentBootstrap
INFO: Upgrading ForecastEval: v0.0.1 => v0.1.0
INFO: Building SpecialFunctions
INFO: Building Rmath

julia> Pkg.status()
13 required packages:
...
 - DependentBootstrap            0.1.0
 - ForecastEval                  0.1.0

Notice that ForecastEval has also automatically returned to the latest version.

Getting Started � The Julia Language, The official website for the Julia Language. Julia is a language that is fast, dynamic, easy to use, and open source. Click here to learn more. Rich Ecosystem for Scientific Computing . Julia is designed from the ground up to be very good at numerical and scientific computing. This can be seen in the abundance of scientific tooling written in Julia, such as the state-of-the-art differential equations ecosystem (DifferentialEquations.jl), optimization tools (JuMP.jl and Optim.jl), iterative linear solvers (IterativeSolvers.jl), a

This question has been answered in How to pin a package to a certain version using Julia 0.7?. Since the focus on that question lies on Julia 0.7 it is hard to link the questions. The following can be used in Julia 1.0 (and 0.7 it seems).

Pkg.add(PackageSpec(name = "GDAL", version = "0.1.2"))
Pkg.pin(PackageSpec(name = "GDAL", version = "0.1.2"))

or in the REPL package mode

pkg> add GDAL@0.1.2
pkg> pin GDAL@0.1.2

Note that if you use PackageSpec, then only using Pkg.add will install the correct version (tested with Docker Image "julia:1.0.5-buster").

Getting Started with Julia, Julia Base contains a range of functions and macros appropriate for performing scientific and numerical computing, but is also as broad as those of many� Julia Ward Howe (/ h aʊ /; May 27, 1819 – October 17, 1910) was an American poet and author, known for writing "The Battle Hymn of the Republic" and the original 1870 pacifist Mother's Day Proclamation.

For the last update of pkg package, the accepted answer no longer works. You must specify the version after the @ symbol. pin Example@0.1.0

(v1.1) pkg> pin CSV@0.4.2
 Resolving package versions...
 Installed CSV ─ v0.4.2
  Updating `C:\Users\S\.julia\environments\v1.1\Project.toml`
  [336ed68f] ↓ CSV v0.4.3 ⇒ v0.4.2 ⚲
  Updating `C:\Users\S\.julia\environments\v1.1\Manifest.toml`
  [336ed68f] ↓ CSV v0.4.3 ⇒ v0.4.2 ⚲

⚲ means that the version is sucsesfully pinned.

Updated link to the official manual

Essentials � The Julia Language, Think Julia: How to Think Like a Computer Scientist [Lauwens, Ben, Downey, Allen B.] on Amazon.com. *FREE* shipping on qualifying offers. Think Julia: How to� hi my name is Julia Arnaz aka Julia Howe, I legally have changed my name after my DNA was done w/ my father Desi jr in 1990, 99.93 percent I am indeed a Arnaz. thank you for some of your nice comments, and I am sorry for those who truly do not understand the whole story.

Think Julia: How to Think Like a Computer Scientist: Lauwens, Ben , Amazon.com: Think Julia: How to Think Like a Computer Scientist eBook: Lauwens, Ben, Downey, Allen B.: Kindle Store. Julia Ward Howe's accomplishments did not end with the writing of her famous poem, "The Battle Hymn of the Republic." As Julia became more famous, she was asked to speak publicly more often. Her husband became less adamant that she remain a private person, and while he never actively supported her further efforts, his resistance eased.

Think Julia: How to Think Like a Computer Scientist , For demonstration purposes, I'll show you the steps to install the DataFrames package. Steps to Install a Package in Julia. Step 1: Open the Julia Command- Line. Julia Ward Howe, American author and lecturer best known for her “Battle Hymn of the Republic.” Julia Ward came of a well-to-do family and was educated privately. In 1843 she married educator Samuel Gridley Howe and took up residence in Boston. Always of a literary bent, she published her first

Julia By Example, To import a module, you need to include the file then import the module. See the comment of @Gnimuc Key. There are still other ways to import a module. Julia Ward Howe's letters and diaries read like a who’s-who of 19th century history, and her ideas are as pertinent today as they were during her own lifetime. There is so much more to be known and understood about the life of Julia Ward Howe.

Comments
  • Type ?Pkg.pin at the REPL
  • Actually, I decided to give a more formal answer since I suspect this question will be searched fairly frequently.
  • Pkg.pin("DependentBootstrap", v"0.0.1") returns "no method matching pin(::String, ::VersionNumber)" in Julia 1.0.5
  • Hi, welcome to Stack Overflow. Please edit your solution to explain exactly how it aligns with / updates the existing accepted answer. Thanks.