I am trying to dev a package I already have locally installed because I am updating my Julia version.
Resolving package versions...
ERROR: Unsatisfiable requirements detected for package NameOfPackage [980c2a51]:
NameOfPackage [980c2a51] log:
├─ NameOfPackage [980c2a51] has no known versions!
└─restricted to versions * by NameOfOtherPackage [e09632b2] — no versions left
However, when I do ] st, I get [afad1059] NameOfPackage v0.2.0 [~/.julia/dev/NameOfPackage]
How can NameOfPackage have no known versions but show a version?
There is a UUID mismatch (one UUID starts with “980c” and one with “afad”) so this looks like two different packages to the resolver. You need to figure out which is the correct one and remove all traces of the wrong UUID.
Related
I'm using Julia v1.5.2 and I got the below error when I tried to install EvalMetrics:
Pkg.add("EvalMetrics")
I even tried using the Pkg manager instead of using import Pkg, but it doesn't seem to make a difference either.
Unsatisfiable requirements detected for package StatsBase [2913bbd2]:
StatsBase [2913bbd2] log:
├─possible versions are: 0.24.0-0.33.19 or uninstalled
├─restricted to versions * by an explicit requirement, leaving only versions 0.24.0-0.33.19
├─restricted by compatibility requirements with JuliaDB [a93385a2] to versions: 0.24.0-0.32.2
│ └─JuliaDB [a93385a2] log:
│ ├─possible versions are: 0.9.0-0.13.1 or uninstalled
│ └─restricted to versions * by an explicit requirement, leaving only versions 0.9.0-0.13.1
└─restricted by compatibility requirements with EvalMetrics [251d5f9e] to versions: 0.33.0-0.33.19 — no versions left
└─EvalMetrics [251d5f9e] log:
├─possible versions are: 0.1.0-0.2.1 or uninstalled
└─restricted to versions 0.1.1 by an explicit requirement, leaving only versions 0.1.1
and when i tried to update StatsBase, it is up to date and i got this:
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`
I'll start by saying don't use Julia 1.5.2 - the current stable release is 1.7.3, and we will soon get 1.8.0, and it's generally adviseable to use the latest stable release (or an LTS if you don't want to make any changes to you environment but still receive bugfixes).
That said, the error you're seeing is unrelated to the Julia version. Here's a minimal reproducer in a clean temporary environment (] activate --temp):
(jl_0jYGBJ) pkg> add JuliaDB EvalMetrics
Resolving package versions...
ERROR: Unsatisfiable requirements detected for package StatsBase [2913bbd2]:
StatsBase [2913bbd2] log:
├─possible versions are: 0.24.0-0.33.19 or uninstalled
├─restricted by compatibility requirements with JuliaDB [a93385a2] to versions: 0.24.0-0.32.2
│ └─JuliaDB [a93385a2] log:
│ ├─possible versions are: 0.9.0-0.13.1 or uninstalled
│ └─restricted to versions * by an explicit requirement, leaving only versions 0.9.0-0.13.1
└─restricted by compatibility requirements with EvalMetrics [251d5f9e] to versions: 0.33.0-0.33.19 — no versions left
└─EvalMetrics [251d5f9e] log:
├─possible versions are: 0.1.0-0.2.1 or uninstalled
└─restricted to versions * by an explicit requirement, leaving only versions 0.1.0-0.2.1
Given that these unsatisfiable requirements errors are reasonably common, I'll try to go through the error message step by step as it can sometimes be daunting for new users to parse, before discussing possible workarounds and commenting on your specific version clash at the end.
Understanding the error message
What's happening here? I'm trying to add JuliaDB and EvalMetrics to this new environment, so the Pkg resolver tries to determine the most up to date versions of both packages which will work together. In this instance, the attempt fails - there are no compatible versions of JuliaDB and EvalMetrics which can coexist. This is because they both depend on StatsBase, but require non-overlapping version numbers of this package. Here's how to read the error message:
StatsBase [2913bbd2] log:
├─possible versions are: 0.24.0-0.33.19 or uninstalled
This just tells us that versions 0.24 to 0.33.19 exist in the General registry and can be installed.
Next the message tells us which versions are allowed by the different packages we're adding to the environment:
├─restricted by compatibility requirements with JuliaDB [a93385a2] to versions: 0.24.0-0.32.2
so JuliaDB works at most with StatsBase version 0.32.2, and does not admit any newer versions.
The next part tells us the restrictions placed on the installation of JuliaDB itself:
│ └─JuliaDB [a93385a2] log:
│ ├─possible versions are: 0.9.0-0.13.1 or uninstalled
│ └─restricted to versions * by an explicit requirement, leaving only versions 0.9.0-0.13.1
This just tells us that JuliaDB has versions 0.9-0.13.1 available, and that we have asked for any JuliaDB version to be installed (restricted to versions * by an explicit requirement means all versions are allowed, but the package has to be installed as we explicitly asked for it).
So we have required JuliaDB, and JuliaDB tells us that it only works with StatsBase up to version 0.32.2. Why is this a problem? Look at the next part of the error:
└─restricted by compatibility requirements with EvalMetrics [251d5f9e] to versions: 0.33.0-0.33.19 — no versions left
EvalMetrics only works with StatsBase versions 0.33.0 and up - which is disallowed by JuliaDB.
Workarounds
So what's to do? It's not clear from your question, but frequently these errors appear where users dump all packages they are installing into their default environment ((#v1.5) in your case). As the number of packages in the default environment goes up, so does the likelihood that any two packages share some dependency and require incompatible versions of that dependency.
Therefore the first "workaround" is to work in project specific environments - there's a good explainer in the Pkg.jl documentation here. In short, make a new folder for whatever analysis you're working on and do ] activate . in that folder to start a new environment to which you only add the specific packages needed for that analysis. (There are other benefits to this, the most important imho being reproducibility of your analysis, but these are unrelated to your question).
In this case, if you don't actually need JuliaDB and EvalMetrics at the same time, you can just make two environments and avoid the conflict.
What if you do actually need two packages which are incompatible with each other? In this case, a relaxation of the compatibility requirements of one of the packages is needed (often referred to as "bumping the compat bounds" of a package. Two ways to go about this:
The easy way (which might take a while though!) is to file an issue on the repo of one of the packages involved. In this case it would likely be JuliaDB, and indeed that issue already exists (more on this later)
The harder (but likely faster) way is to just do it yourself - often packages are unaffected by a version change in one of their dependencies, as they didn't actually rely on the functionality of the dependency that broke in the update. To check whether this is the case, you can ]dev the package and update the dependency, then see whether it still works. If it doesn't you can try updating the package as necessary and make a PR to upstream your changes. I'm not going to pretend that this is easy or a "normal" thing that's expected of Julia users, but I will say that developing Julia packages is comparatively easy (as most things are written in all Julia, no hidden C/C++ code like in R/Python), and the community is likely to receive such an attempt of a new user well and help you out where they can - just post on the Julia Discourse if you get stuck.
Specific comment on JuliaDB
I noted above that the issue asking for a bump of the version bound for StatsBase already exists in the JuliaDB repo. You'll also see that the issue is quite old (almost a year at this point), and if you check the [Project.toml](https://github.com/JuliaData/JuliaDB.jl/blob/main/Project.toml) file, which sets the compat bounds, on the main branch you'll also see that there's been a PR 16 months ago to bump those bounds, but no new version has been released since 2020.
That is to say, you happened on a package which has effectively abandoned - see a related issue here which advises users to switch to Dagger.jl to work with large distributed tables.
If you're now thinking "wait did I just read through all this only to find out that I shouldn't be using JuliaDB" then I suppose you're right, although I hope that the rest of the answer contained useful information which will help you with future compat issues!
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 am using Julia version 1.5.1 on a Win10 operating system. Trying to add Plots and Flux results in the errors listed below:
(#v1.5) pkg> add Plots
Resolving package versions...
ERROR: Unsatisfiable requirements detected for package Contour [d38c429a]:
Contour [d38c429a] log:
├─Contour [d38c429a] has no known versions!
└─found to have no compatible versions left with Plots [91a5bcdd]
└─Plots [91a5bcdd] log:
├─possible versions are: [0.12.1-0.12.4, 0.13.0-0.13.1, 0.14.0-0.14.2, 0.15.0-0.15.1, 0.16.0, 0.17.0-0.17.4, 0.18.0, 0.19.0-0.19.3, 0.20.0-0.20.6, 0.21.0, 0.22.0-0.22.5, 0.23.0-0.23.2, 0.24.0, 0.25.0-0.25.3, 0.26.0-0.26.3, 0.27.0-0.27.1, 0.28.0-0.28.4, 0.29.0-0.29.9, 1.0.0-1.0.14, 1.1.0-1.1.4, 1.2.0-1.2.6, 1.3.0-1.3.7, 1.4.0-1.4.4, 1.5.0-1.5.9, 1.6.0-1.6.3] or uninstalled
└─restricted to versions * by an explicit requirement, leaving only versions [0.12.1-0.12.4, 0.13.0-0.13.1, 0.14.0-0.14.2, 0.15.0-0.15.1, 0.16.0, 0.17.0-0.17.4, 0.18.0, 0.19.0-0.19.3, 0.20.0-0.20.6, 0.21.0, 0.22.0-0.22.5, 0.23.0-0.23.2, 0.24.0, 0.25.0-0.25.3, 0.26.0-0.26.3, 0.27.0-0.27.1, 0.28.0-0.28.4, 0.29.0-0.29.9, 1.0.0-1.0.14, 1.1.0-1.1.4, 1.2.0-1.2.6, 1.3.0-1.3.7, 1.4.0-1.4.4, 1.5.0-1.5.9, 1.6.0-1.6.3]
(#v1.5) pkg> add Flux
Resolving package versions...
ERROR: Unsatisfiable requirements detected for package Flux [587475ba]:
Flux [587475ba] log:
├─Flux [587475ba] has no known versions!
└─restricted to versions * by an explicit requirement — no versions left
I have tried the pkg> update and pkg> gc commands as well, but that did not identify any changes.
The pkg> status yields
(#v1.5) pkg> status
Status `~\.julia\environments\v1.5\Project.toml`
[c3e4b0f8] Pluto v0.11.14
Any suggestions on how to resolve this?
It seems like there is some simple version mismatch occuring when trying to use Julia 1.0+ with this older package.
pkg> add Avro
Resolving package versions...
ERROR: Unsatisfiable requirements detected for package Avro [cb912096]:
Avro [cb912096] log:
├─possible versions are: 0.0.1-0.0.3 or uninstalled
├─restricted to versions * by an explicit requirement, leaving only versions 0.0.1-0.0.3
└─restricted by julia compatibility requirements to versions: uninstalled — no versions left
Is there a way to use Compat or to update the Avro package so it will work in Julia 1.0?
I am trying to use Travis on a package of mine (UnivariateFunctions) that depends on another package (SchumakerSpline). The build always fails, apparently because it cannot access SchumakerSpline. SchumakerSpline can be installed from github to my local machine via REPL so it is not clear what the problem with this package is.
What can cause an error of this sort and more generally what are the required steps for using Travis to test a Julia package that is dependent on other Julia packages? What do you need to do with a package to ensure it can be easily referenced and depended on by other packages?
The full error message is below:
ERROR: Unsatisfiable requirements detected for package SchumakerSpline [65e68595]:
SchumakerSpline [65e68595] log:
├─possible versions are: 0.0.1 or uninstalled
├─restricted to versions 0.0.1-* by UnivariateFunctions [117ba14f], leaving only versions 0.0.1
│ └─UnivariateFunctions [117ba14f] log:
│ ├─possible versions are: 0.0.0 or uninstalled
│ └─UnivariateFunctions [117ba14f] is fixed to version 0.0.0
└─restricted by julia compatibility requirements to versions: uninstalled — no versions left
This:
restricted by julia compatibility requirements
means that the package (SchumakerSpline) does not support the Julia version you are running.
It seem that the developer of SchumakerSpline did not jet make a new release for Julia 1.0. You might want to make an issue on their repo. Beside this you can also use Pkg.clone on Travis CI to have the latest version of SchumakerSpline (which seems to support 1.0).