Pkg.add error: "Unsatisfiable requirements" How to understand and attack these


How do I approach fixing something like the following (Windows, Julia 1.1)

julia> Pkg.add("MacroTools")
  Updating registry at `C:\Users\Herb\.julia\registries\General`
  Updating git-repo ``
 Resolving package versions...
ERROR: Unsatisfiable requirements detected for package CSTParser [00ebfdb7]:
 CSTParser [00ebfdb7] log:
 ├─possible versions are: [0.0.2-0.0.6, 0.1.0-0.1.1, 0.2.0-0.2.2, 0.3.0-0.3.5, 0.4.0-0.4.1] or uninstalled
 ├─restricted by compatibility requirements with LanguageServer [2b0e0bc5] to versions: 0.3.5
 │ └─LanguageServer [2b0e0bc5] log:
 │   ├─possible versions are: [0.0.1, 0.1.0-0.1.5, 0.2.0-0.2.2, 0.3.0, 0.4.0] or uninstalled
 │   └─restricted to versions 0.4.0 by an explicit requirement, leaving only versions 0.4.0
 └─restricted by julia compatibility requirements to versions: 0.4.0-0.4.1 or uninstalled - no versions left

Not asking for a solution, though that’s appreciated too.
I really want to know how to understand that error message and work through it.
(Of course I get the general idea of “Unsatisfiable requirements”)


Pkg.rm("CSTParser") since it doesn’t support julia 1.0.


ok, didn’t work but that’s apparently because I don’t have CSTParser.

I suppose that MacroTools is requring CSTParser which would mean it doesn’t work with Julia 1.0+ also?

(Thanks so much for your quick and helpful reply.)


Ok if asking nicely didnt work, we have to get serious.

using Pkg
Pkg.rm("CSTParser"; mode = PKGMODE_MANIFEST)


Ok, I didn’t see this until after I got serious and based on some help from Slack channel started just removing anything that got in the way or was containing some other Pkg in the way.

Got to here:(that way)>

rm for LanguageServer (didn’t have CSTParser directly), FactCheck, Devectorize, (DataArrays) DataFrames,BinaryBuilder, (DataArrays)Benchmark,

finally just got into a loop with DataFramesMeta not in project, couldn’t add, couldn’t get HttpParser without it being right

I am going to go try your suggested PKGMODE_MANIFEST switch now on those.


Pkg.rm(“HttpParser”; mode = PKGMODE_MANIFEST)
over on Discourse.
I’m rm anything that gets in the way.

(using PKGMODE_MANIFEST only when it won’t remove easily: rm HttpParser, Pcap, FunctionalData, ReverseDiffSource, Options,Graphs,Gallium,StringLiterals, Twitter, Iterators,
PackageCompiler, Iterators, Pipe, TypedDelegation, Typeclass, SMTPClient, Debug, PatternDispatch, RDatasets, ExpressionPatterns,BuildExecutable, TakingBroadcastSeriously,

Can’t rm TakingBroadcastSeriously even with mode switch


MacroTools only requires Compat and Julia 0.6+, while Compat only requires Julia 0.6+.

I’m guessing you can’t add any packages.


Ok, so I backed up and removed Julia 1.1 and I am going to start fresh.

Thanks for help.


One other thing you can always do is to use the dev command instead of add, which should bypass the satisfiability requirements of the package manager. But you are then using the master branch.


I think switching the active package environment might’ve been an option aswell.

julia> mkdir("env2");
julia> cd("env2");
julia> ]
<v1.0> pkg> activate .
<env2> pkg> st
Status: `Project.toml` 
<env2> pkg>st -m
Status `Manifest.toml`
<env2> pkg>


Thanks everyone – especially for the suggestions about what was happening and troubleshooting alternatives.

To fix “the problem”,I just deleted Julia completely and started over fresh with 1.0.1.

But I learned more TRYING to fix it (by following the suggestions), so that was good.

I didn’t see or try dev command (thx @chakravala ) nor moving to another package environment (I don’t fully understand that one @y4lu though I sort of can guess and suppose I can check the documentation.

So the idea is to make a new directory, change to it, switch to package management, “activate” that directory as the package environment, check status (st) of Project.toml and status (st -m) of Manifest.toml

and of course thx again to @kristoffer.carlsson and over on slack @JeffreySarnoff


env2 should then be about the same as a fresh install in terms of packages installed. You can also see the added packages and dependencies in the current environment with the st and st -m, I’d guess it might be a problem with left-over dependencies after adding and removing packages


@HerbM I very much sympathise with you. I have been struggling with packages, as I woudl like to build another package for 1.0
That error message from the package manager is compltely opaque - it has three phrases lus lots of numbers:

possible versions are:
restricted by compatibility requirements with LanguageServer:
restricted by julia compatibility requirements to versions:

It SHOULD start by saying without ambiguity:
You are trying to install Package XYZ I can find no version of this package which is compatible with the version of Julia which you are using.

I am filing an issue on the Pkg Github page - I can see this being a real barrier to the adoption of Julia.


Thanks @johnh – commiseration is generally helpful (e.g., encouraging people to keep going), and it sounds like you are as much (or more) in need of help than I am.

The issue is a good idea – I had trouble reading the error messages, even though I think that you may get pushback that “the name is there” – so there are 2 issues:

  1. Hard t read error messages – 2 part solution: Improve them, Tutorial on reading them (seriously)
  2. What to do with the info if once its readable

I literally give all my PowerShell students a couple of mini-lessons on reading both the HELP and the ERROR messages. PowerShell has some of the best of both (of any language) except that it is both so REGULAR (standardized) and DENSE that people don’t read it.

We (in JuliaLang) need more and better tools, and better education materials, including much better help if Julia is going to continue to grow at a rapid rate.


@HerbM There is a great community here. Continue to ask questions - I do!

My issue:
Which is now closed as the same issue is here:


Yes @johnh , many people have been helpful. It’s a very good sign for Julia as a language that the commnity works so quickly to help people with issues

The more successful Julia is, the better it will become, in a feedback loop.