Unable to upgrade to latest version of MCMCDiagnosticTools

Hello everyone,

Here is what the software is saying to me :

(@v1.8) pkg> status --outdated
Status `~/.julia/environments/v1.8/Project.toml`
⌅ [be115224] MCMCDiagnosticTools v0.2.6 (<v0.3.1): MCMCChains

(@v1.8) pkg> add MCMCDiagnosticTools@0.3.1
   Resolving package versions...
ERROR: Unsatisfiable requirements detected for package MCMCChains [c7f686f2]:
 MCMCChains [c7f686f2] log:
 ├─possible versions are: 0.2.4-5.7.1 or uninstalled
 ├─restricted to versions * by an explicit requirement, leaving only versions 0.2.4-5.7.1
 ├─restricted by compatibility requirements with MCMCDiagnosticTools [be115224] to versions: 0.2.4-4.14.1 or uninstalled, leaving only versions: 0.2.4-4.14.1
 │ └─MCMCDiagnosticTools [be115224] log:
 │   ├─possible versions are: 0.1.0-0.3.1 or uninstalled
 │   └─restricted to versions 0.3.1 by an explicit requirement, leaving only versions 0.3.1
 └─restricted by compatibility requirements with Turing [fce5fe82] to versions: 5.0.0-5.7.1 — no versions left
   └─Turing [fce5fe82] log:
     ├─possible versions are: 0.5.0-0.24.0 or uninstalled
     └─restricted to versions 0.23.2-0.24 by CRRao [49d1be55], leaving only versions 0.23.2-0.24.0
       └─CRRao [49d1be55] log:
         ├─possible versions are: 0.1.0 or uninstalled
         └─CRRao [49d1be55] is fixed to version 0.1.0

(@v1.8) pkg> 

Can someone explain to me how I can upgrade to the latest version of MCMCDiagnosticTools?

Many thanks.

It’s really useful to format your code with triple backticks ``` to make it legible.

In short, you have MCMCDiagnosticTools in your environment which restricts MCMCChains to versions <=4.14, and you also have Turing in your environment which is restricted to >=0.23.2 by CRRao. Turing@0.23.2 does not allow MCMCChains below version 5 though, so the environment cannot be resolved.

It also looks like you are installing all your packages in the default environment - don’t do this, work with project specific environments instead to minimise incompatibilities like this.

@nilshg Many thanks for your reply.

I have added the ``` around the code as you suggested.

I have another query. I need Turing / CRRao / MCMCChains for my analysis.

On carefully examining my analysis, I do not need MCMCDiagnosticTools.

But now I am curious, how would I fix this if I did needed MCMCDIagnosticTools?

You would need to make a PR to one of the packages to make them compatible - most likely in this case to MCMCChains to allow a more recent version of MCMCDiagnosticTools.

In this specific case as far as I understand CRRao is just a wrapper around GLM and Turing so you could just use the underlying packages rather than CRRao.

Dear @nilshg,

Many thanks for that.

1 Like