Is there a way to list all outdated packages in Julia? An equivalent of pip3 list --outdated in Python.
I made a couple searches (1, 2), but couldn't find an answer.
This feature is implemented for the upcoming Julia 1.8 release as the --outdated flag to the status command:
(v1) pkg> status
Status `~/.julia/environments/v1/Project.toml`
[7876af07] Example v0.5.1
(v1) pkg> status --outdated
Status `~/.julia/environments/v1/Project.toml`
[7876af07] Example v0.5.1 (<v0.5.3)
See https://github.com/JuliaLang/Pkg.jl/pull/2284
Related
I am trying to solve this issue.
I understand that my version of the package is outdated (v1.7.2).
However, the package manager thinks I'm on the up-to-date version (v2.3.1).
(#v1.7) pkg> up
Updating registry at `~/.julia/registries/General.toml`
No Changes to `~/.julia/environments/v1.7/Project.toml`
No Changes to `~/.julia/environments/v1.7/Manifest.toml`
(#v1.7) pkg> st Parsers
Status `~/.julia/environments/v1.7/Project.toml`
[69de0a69] Parsers v2.3.1
julia> using Parsers
julia> Parsers.VERSION
v"1.7.2"
If I uninstall/reinstall the problem is still there:
(#v1.7) pkg> rm Parsers
Updating `~/.julia/environments/v1.7/Project.toml`
[69de0a69] - Parsers v2.3.1
No Changes to `~/.julia/environments/v1.7/Manifest.toml`
julia> using Parsers
│ Package Parsers not found, but a package named Parsers is available from a registry.
│ Install package?
│ (#v1.7) pkg> add Parsers
└ (y/n) [y]: y
Resolving package versions...
Updating `~/.julia/environments/v1.7/Project.toml`
[69de0a69] + Parsers v2.3.1
No Changes to `~/.julia/environments/v1.7/Manifest.toml`
julia> using Parsers
julia> Parsers.VERSION
v"1.7.2"
PackageName.VERSION, in contrast to what it intuitively looks like, does not give you the version of the package - it gives you the version of Julia currently installed. So v"1.7.2" refers to your installed version of Julia - you can verify this by loading any other package and trying LoadedPackage.VERSION on them, which should return the same value. (I'm not sure about the reason for such a design - having VERSION be a member of every module - but perhaps there's some value in VERSION being available as a local name within every module namespace.)
So you do have version 2.3.1 of Parsers installed, as the package manager indicates. The source of your original problem must be something else - perhaps it's worth asking as a separate question.
I had used Julia some months back for a project, and didn't use it since. I hadn't faced problems back then. But now, I absolutely am not able to install any package.
(#v1.5) pkg> add Distributions
Resolving package versions...
ERROR: Unsatisfiable requirements detected for package Distributions [31c24e10]:
Distributions [31c24e10] log:
├─Distributions [31c24e10] has no known versions!
└─restricted to versions * by an explicit requirement — no versions left
Any package I install, I am getting the same error. How do I fix it?
This is the status of Pkg:
(#v1.5) pkg> status
Status `C:\Users\jaine\.julia\environments\v1.5\Project.toml`
[6e4b80f9] BenchmarkTools v0.5.0
[7073ff75] IJulia v1.21.2
[91a5bcdd] Plots v1.6.0
[438e738f] PyCall v1.91.4
[d330b81b] PyPlot v2.9.0
[2913bbd2] StatsBase v0.33.0
Given
├─Distributions [31c24e10] has no known versions!
it looks like you have a missing or corrupt package registry. The package manager will reinstall it for you if you delete .julia/registries and try to add the package again.
You can do this from within julia
rm(joinpath(homedir(), ".julia", "registries"), recursive=true, force=true)
These are indeed some of the more tricky situations to resolve so please bear with me as we work through this.
If you are not familiar with the basics of the package manager, it's worth a quick read to check out: https://julialang.github.io/Pkg.jl/v1/getting-started/
Assuming you are now in the Julia Repl, my general work flow for these issues is to remove everything it warns me about. The core problem here is that one of your existing packages is saying it needs a specific version of Distributions.jl but it's not able to add it. So, the first step would be to enter the pkg manager by doing ] and type rm Distributions.
Then, while still in the pkg mode, do resolve and add Distributions.
So the process is to just remove each package the Repl complains about until it stops complaining.
Note: If you run into something like this again, the worst-case scenario is to remove the project and manifest files for the specific Julia version you are using. If you navigate to ".julia/environments" you should be able to completely reset the Julia Env for a specific version there (that way you don't need to actually reinstall Julia).
I am installing Julia packages in Linux system. The error message is below. There are three kinds of error message. I don't know how to fix it. I have already tried pkg> update. It didn't help. The julia version is Version 1.0.0 (2018-08-08).
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.
Have you tried :
Pkg.pin("DifferentialEquations",v"4.0.0")
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 DifferentialEquations#6.0.0
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"))
Is it possible to install the current R-devel version via homebrew?
I have already tried brew install --devel r, which does not work.
The reason is indicated in the error message Error: No devel block is defined for r. If you run brew edit r you'll note there is no devel code block indicating the necessary url for the requested development version. Alternatively, you can append the --HEAD flag which will install the most recent r version with the latest commits available in the source repo. The difference between --devel and --HEAD flags is discussed in the Homebrew formula cookbook. Similar info is also discussed here.