MOON
MOON

Reputation: 2801

Julia does not update its packages

I installed DifferentialEquations by using:

Pkg.add("DifferentialEquations")

Then I used the below line to check the version:

Pkg.status("DifferentialEquations")

It returns 1.0.0 while, it must be 4.0.0.

I tried Pkg.update() or Pkg.update("DifferentialEquations). However, the version is still 1.0.0 and re-installing Julia did not help neither.

What can be done to update the DifferentialEqautions package?

The version of Julia is 0.6.2.

Edit

This time I not only uninstalled Julia, but I also deleted its folder in appdata. After installing Julia again and adding the package, now it is up to date.

Upvotes: 3

Views: 1072

Answers (2)

David Sainez
David Sainez

Reputation: 6956

You can force Pkg to find a solution by giving an explicit version.

For example, going from version 5 to version 6 of the DifferentialEquations package:

(TestProject) pkg> status
    Status `/tmp/TestProject/Project.toml`
  [0c46a032] DifferentialEquations v5.0.0

(TestProject) pkg> add [email protected]
 Resolving package versions...
  Updating `/tmp/TestProject/Project.toml`
  [0c46a032] ↑ DifferentialEquations v5.0.0 ⇒ v6.0.0
  Updating `/tmp/TestProject/Manifest.toml`
  [1520ce14] - AbstractTrees v0.2.1
  [79e6a3ab] - Adapt v1.0.0
  [4fba245c] ↓ ArrayInterface v2.3.1 ⇒ v0.1.1
  [9e28174c] - BinDeps v1.0.0
...

(TestProject) pkg> status
    Status `/tmp/TestProject/Project.toml`
  [0c46a032] DifferentialEquations v6.0.0

The equivalent API syntax:

julia> import Pkg
julia> Pkg.add(Pkg.PackageSpec(; name="DifferentialEquations", version=v"6.0.0"))

Upvotes: 1

A. Colonna
A. Colonna

Reputation: 872

Have you tried :

Pkg.pin("DifferentialEquations",v"4.0.0")

Upvotes: 1

Related Questions