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

**URL:** <https://discourse.julialang.org/t/pkg-add-error-unsatisfiable-requirements-how-to-understand-and-attack-these/16213>\
**Category:** New to Julia\
**Created:** [October 12, 2018, 2:54am UTC](https://discourse.julialang.org/t/pkg-add-error-unsatisfiable-requirements-how-to-understand-and-attack-these/16213 "2018-10-12T02:54:37Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![HerbM](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/herbm/32/5082_2.png) [@HerbM](https://discourse.julialang.org/u/HerbM)\
**Post date:** [October 12, 2018, 2:54am UTC](https://discourse.julialang.org/t/pkg-add-error-unsatisfiable-requirements-how-to-understand-and-attack-these/16213/1 "2018-10-12T02:54:37Z")

</div>

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

```julia
julia> Pkg.add("MacroTools")
  Updating registry at `C:\Users\Herb\.julia\registries\General`
  Updating git-repo `https://github.com/JuliaRegistries/General.git`
 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”)

---

<div class="post-metadata">

**Author:** ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)\
**Post date:** [October 12, 2018, 3:00am UTC](https://discourse.julialang.org/t/pkg-add-error-unsatisfiable-requirements-how-to-understand-and-attack-these/16213/2 "2018-10-12T03:00:38Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![HerbM](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/herbm/32/5082_2.png) [@HerbM](https://discourse.julialang.org/u/HerbM)\
**Post date:** [October 12, 2018, 3:05am UTC](https://discourse.julialang.org/t/pkg-add-error-unsatisfiable-requirements-how-to-understand-and-attack-these/16213/3 "2018-10-12T03:05:35Z")

</div>

> [@kristoffer.carlsson](#):
>
> `Pkg.rm("CSTParser")`

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.)

---

<div class="post-metadata">

**Author:** ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)\
**Post date:** [October 12, 2018, 3:14am UTC](https://discourse.julialang.org/t/pkg-add-error-unsatisfiable-requirements-how-to-understand-and-attack-these/16213/4 "2018-10-12T03:14:57Z")

</div>

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

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

```

---

<div class="post-metadata">

**Author:** ![HerbM](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/herbm/32/5082_2.png) [@HerbM](https://discourse.julialang.org/u/HerbM)\
**Post date:** [October 12, 2018, 4:34am UTC](https://discourse.julialang.org/t/pkg-add-error-unsatisfiable-requirements-how-to-understand-and-attack-these/16213/5 "2018-10-12T04:34:41Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![HerbM](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/herbm/32/5082_2.png) [@HerbM](https://discourse.julialang.org/u/HerbM)\
**Post date:** [October 12, 2018, 4:57am UTC](https://discourse.julialang.org/t/pkg-add-error-unsatisfiable-requirements-how-to-understand-and-attack-these/16213/6 "2018-10-12T04:57:47Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Elrod](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/elrod/32/22461_2.png) [@Elrod](https://discourse.julialang.org/u/Elrod)\
**Post date:** [October 12, 2018, 5:08am UTC](https://discourse.julialang.org/t/pkg-add-error-unsatisfiable-requirements-how-to-understand-and-attack-these/16213/7 "2018-10-12T05:08:00Z")

</div>

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

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

---

<div class="post-metadata">

**Author:** ![HerbM](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/herbm/32/5082_2.png) [@HerbM](https://discourse.julialang.org/u/HerbM)\
**Post date:** [October 12, 2018, 5:19am UTC](https://discourse.julialang.org/t/pkg-add-error-unsatisfiable-requirements-how-to-understand-and-attack-these/16213/8 "2018-10-12T05:19:55Z")

</div>

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

Thanks for help.

---

<div class="post-metadata">

**Author:** ![chakravala](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chakravala/32/6832_2.png) [@chakravala](https://discourse.julialang.org/u/chakravala)\
**Post date:** [October 12, 2018, 5:27am UTC](https://discourse.julialang.org/t/pkg-add-error-unsatisfiable-requirements-how-to-understand-and-attack-these/16213/9 "2018-10-12T05:27:12Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![y4lu](https://avatars.discourse-cdn.com/v4/letter/y/47e85d/32.png) [@y4lu](https://discourse.julialang.org/u/y4lu)\
**Post date:** [October 12, 2018, 1:17pm UTC](https://discourse.julialang.org/t/pkg-add-error-unsatisfiable-requirements-how-to-understand-and-attack-these/16213/10 "2018-10-12T13:17:47Z")

</div>

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

```julia
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>
```

---

<div class="post-metadata">

**Author:** ![HerbM](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/herbm/32/5082_2.png) [@HerbM](https://discourse.julialang.org/u/HerbM)\
**Post date:** [October 13, 2018, 4:21am UTC](https://discourse.julialang.org/t/pkg-add-error-unsatisfiable-requirements-how-to-understand-and-attack-these/16213/11 "2018-10-13T04:21:20Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![y4lu](https://avatars.discourse-cdn.com/v4/letter/y/47e85d/32.png) [@y4lu](https://discourse.julialang.org/u/y4lu)\
**Post date:** [October 13, 2018, 4:47am UTC](https://discourse.julialang.org/t/pkg-add-error-unsatisfiable-requirements-how-to-understand-and-attack-these/16213/12 "2018-10-13T04:47:50Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![johnh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/johnh/32/3615_2.png) [@johnh](https://discourse.julialang.org/u/johnh)\
**Post date:** [October 13, 2018, 6:25am UTC](https://discourse.julialang.org/t/pkg-add-error-unsatisfiable-requirements-how-to-understand-and-attack-these/16213/13 "2018-10-13T06:25:35Z")

</div>

@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.

---

<div class="post-metadata">

**Author:** ![HerbM](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/herbm/32/5082_2.png) [@HerbM](https://discourse.julialang.org/u/HerbM)\
**Post date:** [October 13, 2018, 6:34am UTC](https://discourse.julialang.org/t/pkg-add-error-unsatisfiable-requirements-how-to-understand-and-attack-these/16213/14 "2018-10-13T06:34:34Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![johnh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/johnh/32/3615_2.png) [@johnh](https://discourse.julialang.org/u/johnh)\
**Post date:** [October 13, 2018, 8:24am UTC](https://discourse.julialang.org/t/pkg-add-error-unsatisfiable-requirements-how-to-understand-and-attack-these/16213/15 "2018-10-13T08:24:14Z")

</div>

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

My issue: [Need a clear error message when Pkg.add fails · Issue #823 · JuliaLang/Pkg.jl · GitHub](https://github.com/JuliaLang/Pkg.jl/issues/823)  
Which is now closed as the same issue is here:  
[https://github.com/JuliaLang/Pkg.jl/issues/819](https://github.com/JuliaLang/Pkg.jl/issues/819)

---

<div class="post-metadata">

**Author:** ![HerbM](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/herbm/32/5082_2.png) [@HerbM](https://discourse.julialang.org/u/HerbM)\
**Post date:** [October 13, 2018, 8:29am UTC](https://discourse.julialang.org/t/pkg-add-error-unsatisfiable-requirements-how-to-understand-and-attack-these/16213/16 "2018-10-13T08:29:42Z")

</div>

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.
