Pkg: Unsatisfiable requirements detected


I have this problem when trying to install AutoGrad.jl

(1.1) pkg>add AutoGrad
ERROR: Unsatisfiable requirements detected for package SIUnits [b9d75638]:
 SIUnits [b9d75638] log:
 ├─possible versions are: [0.0.1-0.0.6, 0.1.0] or uninstalled
 ├─restricted by compatibility requirements with Images [916415d5] to versions: [0.0.1-0.0.6, 0.1.0]
 │ └─Images [916415d5] log:
 │   ├─possible versions are: [0.2.0-0.2.50, 0.3.0-0.3.3, 0.4.0-0.4.50, 0.5.0-0.5.14, 0.6.0-0.6.1, 0.7.0, 0.8.0, 0.9.0-0.9.1, 0.10.0-0.10.1, 0.11.0-0.11.5, 0.12.0, 0.13.0, 0.14.0, 0.15.0-0.15.1, 0.16.0-0.16.1, 0.17.0-0.17.3] or uninstalled
 │   └─restricted to versions 0.17.2 by an explicit requirement, leaving only versions 0.17.2
 └─restricted by julia compatibility requirements to versions: uninstalled — no versions left

How can i fix this?, i want to remove SIUnits, but it isn’t in my project, so i can’t. Im looking for a way to remove that package

EDIT: solved, use gc



Could you please elaborate on how you solved this using gc? I’m a newcomer to the language and have had a slew of identical error messages upon each Pkg.add(“x”) call.



Possibly typing ] gc ENTER, which invokes the garbage collector.



I don’t understand why calling gc solves this. My understanding was that the packages deleted by gc were not being used anyway so conflicts with them would not cause errors. It seems like a problem to me that packages that would be deleted by gc can cause unsatisfiable requirements errors at all.



Calling pkg> gc can’t possibly have an effect on this. Multiple incompatible versions can be installed at the same time by design. They cannot, however, be in the same manifest at the same time.

1 Like


That makes sense, but could you then clarify what gc does to the manifest? I was under the impression that it was deleting package versions which were omitted from the manifest.



It deletes package versions that are no longer referred to by any manifest of all the manifests recorded in the ~/.julia/logs/manifest_usage.toml log file.

1 Like


Updating your packages pkg> up can solve it. If not, do pkg> rm -m Package where Package is the problematic package. gc will not change anything indeed. I mean, it would be a bad garbage collector if it changed any behavior.