Issues installing symbolics.jl

I’ve been setting up Julia to learn via QuantEcon and one of the packages they recommend me to install is symbolics.jl. However, I’ve been getting the following error:

(@v1.6) pkg> add Symbolics
   Resolving package versions...
ERROR: Unsatisfiable requirements detected for package DataStructures [864edb3b]:
 DataStructures [864edb3b] log:
 ├─possible versions are: 0.9.0-0.18.10 or uninstalled
 ├─restricted to versions * by an explicit requirement, leaving only versions 0.9.0-0.18.10
 ├─restricted by compatibility requirements with Gen [ea4f424c] to versions: 0.15.0-0.18.10
 │ └─Gen [ea4f424c] log:
 │   ├─possible versions are: 0.3.5-0.4.4 or uninstalled
 │   ├─restricted to versions * by an explicit requirement, leaving only versions 0.3.5-0.4.4
 │   └─restricted by compatibility requirements with Distributions [31c24e10] to versions: 0.3.5-0.4.1 or uninstalled, leaving only versions: 0.3.5-0.4.1
 │     └─Distributions [31c24e10] log:
 │       ├─possible versions are: 0.16.0-0.25.32 or uninstalled
 │       ├─restricted to versions * by an explicit requirement, leaving only versions 0.16.0-0.25.32
 │       ├─restricted by compatibility requirements with FinancialDerivatives [43843433] to versions: 0.16.0-0.23.12
 │       │ └─FinancialDerivatives [43843433] log:
 │       │   ├─possible versions are: 0.0.1 or uninstalled
 │       │   └─restricted to versions * by an explicit requirement, leaving only versions 0.0.1
 │       └─restricted by compatibility requirements with Symbolics [0c5d862f] to versions: 0.23.0-0.25.32, leaving only versions: 0.23.0-0.23.12
 │         └─Symbolics [0c5d862f] log:
 │           ├─possible versions are: 0.1.0-4.1.0 or uninstalled
 │           └─restricted to versions * by an explicit requirement, leaving only versions 0.1.0-4.1.0
 ├─restricted by compatibility requirements with StatsBase [2913bbd2] to versions: 0.9.0-0.17.20, leaving only versions: 0.15.0-0.17.20
 │ └─StatsBase [2913bbd2] log:
 │   ├─possible versions are: 0.24.0-0.33.13 or uninstalled
 │   ├─restricted to versions * by an explicit requirement, leaving only versions 0.24.0-0.33.13
 │   ├─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 Distributions [31c24e10] to versions: 0.32.0-0.33.13, leaving only versions: 0.32.0-0.32.2
 │     └─Distributions [31c24e10] log: see above
 └─restricted by compatibility requirements with SymbolicUtils [d1185830] to versions: 0.18.0-0.18.10 — no versions left
   └─SymbolicUtils [d1185830] log:
     ├─possible versions are: 0.1.0-0.18.1 or uninstalled
     └─restricted by compatibility requirements with Symbolics [0c5d862f] to versions: [0.8.4-0.13.5, 0.15.1-0.18.1]
       └─Symbolics [0c5d862f] log: see above

I have tried removing DataStructures but it keeps coming up with the same error despite having removed that package already. Is there any way to work around these issues or am I missing something.

I am on a 2015 MacBook Pro 13 with 8GB RAM if this is a hardware issue.

This is not a hardware issue - you just have all you packages installed in the global environment, leading to version conflicts.

Work in a project specific environment (] activate path/to/my/analysis) and add only the packages you need for the analysis you’re currently doing to minimise this issue.

Also as a general point you are reading the output wrong - your problem is not having DataStructures installed, the problem is that different packages in your environment need different versions of DataStructures. If I’m reading correctly JuliaDB only works with StatsBase up to 0.33.13, which only works with DataStructures up to 0.17, while Symbolics needs DataStructures 0.18

1 Like

Ok that makes sense. I’ll try that now!

1 Like