# Adding ReinforcementLearning to environment fails. compatibility issue

**URL:** <https://discourse.julialang.org/t/adding-reinforcementlearning-to-environment-fails-compatibility-issue/116122>\
**Category:** New to Julia\
**Tags:** question, package\
**Created:** [June 23, 2024, 9:16pm UTC](https://discourse.julialang.org/t/adding-reinforcementlearning-to-environment-fails-compatibility-issue/116122 "2024-06-23T21:16:47Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![korilium](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/korilium/32/48714_2.png) [@korilium](https://discourse.julialang.org/u/korilium)\
**Post date:** [June 23, 2024, 9:16pm UTC](https://discourse.julialang.org/t/adding-reinforcementlearning-to-environment-fails-compatibility-issue/116122/1 "2024-06-23T21:16:47Z")

</div>

Hello,

I tried installing the ReinforcementLearning.jl package in my environment and I get the following error:

```julia
(Peccon) pkg> add ReinforcementLearning
   Resolving package versions...
ERROR: Unsatisfiable requirements detected for package ReinforcementLearning [158674fc]:
 ReinforcementLearning [158674fc] log:
 ├─possible versions are: 0.2.0-0.11.0 or uninstalled
 ├─restricted to versions * by an explicit requirement, leaving only versions: 0.2.0-0.11.0
 ├─restricted by compatibility requirements with Reexport [189a3867] to versions: [0.2.0-0.3.0, 0.9.0-0.11.0] or uninstalled, leaving only versions: [0.2.0-0.3.0, 0.9.0-0.11.0]
 │ └─Reexport [189a3867] log:
 │ ├─possible versions are: 0.2.0-1.2.2 or uninstalled
 │ └─restricted by compatibility requirements with OptimizationOptimJL [36348300] to versions: 1.2.0-1.2.2
 │ └─OptimizationOptimJL [36348300] log:
 │ ├─possible versions are: 0.1.1-0.3.2 or uninstalled
 │ └─restricted to versions 0.1 by Peccon [f5b9415a], leaving only versions: 0.1.1-0.1.14
 │ └─Peccon [f5b9415a] log:
 │ ├─possible versions are: 0.1.1 or uninstalled
 │ └─Peccon [f5b9415a] is fixed to version 0.1.1
 ├─restricted by compatibility requirements with ReinforcementLearningBase [e575027e] to versions: 0.2.0-0.10.2 or uninstalled, leaving only versions: [0.2.0-0.3.0, 0.9.0-0.10.2]
 │ └─ReinforcementLearningBase [e575027e] log:
 │ ├─possible versions are: 0.1.0-0.13.1 or uninstalled
 │ ├─restricted by compatibility requirements with CUDAapi [3895d2a7] to versions: [0.1.0-0.5.0, 0.6.6-0.13.1] or uninstalled
 │ │ └─CUDAapi [3895d2a7] log:
 │ │ ├─possible versions are: 0.5.0-4.0.0 or uninstalled
 │ │ └─restricted by julia compatibility requirements to versions: uninstalled
 │ └─restricted by compatibility requirements with DomainSets [5b8099bc] to versions: 0.1.0-0.12.1 or uninstalled, leaving only versions: [0.1.0-0.5.0, 0.6.6-0.12.1] or uninstalled
 │ └─DomainSets [5b8099bc] log:
 │ ├─possible versions are: 0.0.1-0.7.14 or uninstalled
 │ └─restricted by compatibility requirements with ModelingToolkit [961ee093] to versions: 0.5.0-0.6.7
 │ └─ModelingToolkit [961ee093] log:
 │ ├─possible versions are: 0.0.1-9.19.0 or uninstalled
 │ └─restricted to versions 8 by Peccon [f5b9415a], leaving only versions: 8.0.0-8.76.0
 │ └─Peccon [f5b9415a] log: see above
 ├─restricted by compatibility requirements with Compat [34da2185] to versions: 0.4.0-0.11.0 or uninstalled, leaving only versions: 0.9.0-0.10.2
 │ └─Compat [34da2185] log:
 │ ├─possible versions are: 1.0.0-4.15.0 or uninstalled
 │ ├─restricted by compatibility requirements with Optim [429524aa] to versions: 3.2.0-4.15.0
 │ │ └─Optim [429524aa] log:
 │ │ ├─possible versions are: 0.15.3-1.9.4 or uninstalled
 │ │ └─restricted to versions 1 by Peccon [f5b9415a], leaving only versions: 1.0.0-1.9.4
 │ │ └─Peccon [f5b9415a] log: see above
 │ └─restricted by compatibility requirements with AlphaVantage [6348297c] to versions: 2.1.0-3.47.0, leaving only versions: 3.2.0-3.47.0
 │ └─AlphaVantage [6348297c] log:
 │ ├─possible versions are: 0.1.0-0.4.1 or uninstalled
 │ └─restricted to versions 0.4 by Peccon [f5b9415a], leaving only versions: 0.4.1
 │ └─Peccon [f5b9415a] log: see above
 └─restricted by compatibility requirements with ReinforcementLearningCore [de1b191a] to versions: 0.2.0-0.3.0 or uninstalled — no versions left
   └─ReinforcementLearningCore [de1b191a] log:
     ├─possible versions are: 0.1.0-0.15.3 or uninstalled
     ├─restricted by compatibility requirements with CUDAapi [3895d2a7] to versions: [0.1.0-0.2.0, 0.4.0-0.15.3] or uninstalled
     │ └─CUDAapi [3895d2a7] log: see above
     ├─restricted by compatibility requirements with Reexport [189a3867] to versions: 0.2.0-0.15.3 or uninstalled, leaving only versions: [0.2.0, 0.4.0-0.15.3] or uninstalled
     │ └─Reexport [189a3867] log: see above
     ├─restricted by compatibility requirements with ReinforcementLearningBase [e575027e] to versions: 0.1.0-0.14.0 or uninstalled, leaving only versions: [0.2.0, 0.4.0-0.14.0] or uninstalled
     │ └─ReinforcementLearningBase [e575027e] log: see above
     ├─restricted by compatibility requirements with CUDA [052768ef] to versions: [0.1.0-0.3.3, 0.13.1-0.15.3] or uninstalled, leaving only versions: [0.2.0, 0.13.1-0.14.0] or uninstalled
     │ └─CUDA [052768ef] log:
     │ ├─possible versions are: 0.1.0-5.4.2 or uninstalled
     │ ├─restricted by julia compatibility requirements to versions: [2.3.0, 2.5.0-5.4.2] or uninstalled
     │ └─restricted by compatibility requirements with GPUCompiler [61eb1bfa] to versions: 5.0.0-5.4.2 or uninstalled
     │ └─GPUCompiler [61eb1bfa] log:
     │ ├─possible versions are: 0.1.0-0.26.5 or uninstalled
     │ └─restricted by julia compatibility requirements to versions: 0.22.0-0.26.5 or uninstalled
     └─restricted by compatibility requirements with Distributions [31c24e10] to versions: 0.2.5-0.15.3 or uninstalled, leaving only versions: 0.13.1-0.14.0 or uninstalled
       └─Distributions [31c24e10] log:
         ├─possible versions are: 0.16.0-0.25.109 or uninstalled
         └─restricted by compatibility requirements with ModelingToolkit [961ee093] to versions: 0.23.0-0.25.109
           └─ModelingToolkit [961ee093] log: see above

```

Can someone explain what I should do to resolve the compatibility issue? I do not understand where the compatibility issue lies. I tried removing different packages but this does not work. I can load in the package in my script, but it doesn’t appear in my environment. I can also run the one-dimensional walk tutorial without a problem. This is strange as I do not see it in my environment, yet I can run the package either way.

Many thanks in advance for your help.

kr,

Korilium

---

<div class="post-metadata">

**Author:** ![gdalle](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gdalle/32/224680_2.png) [@gdalle](https://discourse.julialang.org/u/gdalle)\
**Post date:** [June 24, 2024, 5:23am UTC](https://discourse.julialang.org/t/adding-reinforcementlearning-to-environment-fails-compatibility-issue/116122/2 "2024-06-24T05:23:43Z")

</div>

Hi! Can you share your complete environment?

---

<div class="post-metadata">

**Author:** ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Post date:** [June 24, 2024, 6:17am UTC](https://discourse.julialang.org/t/adding-reinforcementlearning-to-environment-fails-compatibility-issue/116122/3 "2024-06-24T06:17:35Z")

</div>

Please share the output of:

```julia
using Pkg
Pkg.status()

```

and read: [Working with Julia projects | Julia programming notes](https://ufechner7.github.io/2022/08/16/julia-projects.html)

---

<div class="post-metadata">

**Author:** ![korilium](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/korilium/32/48714_2.png) [@korilium](https://discourse.julialang.org/u/korilium)\
**Post date:** [June 30, 2024, 2:37pm UTC](https://discourse.julialang.org/t/adding-reinforcementlearning-to-environment-fails-compatibility-issue/116122/4 "2024-06-30T14:37:48Z")

</div>

Thanks for the reply,

This is the output that I get when I run it:

```julia
Project Peccon v0.1.1
Status `~/Documents/GitHub/Peccon.jl/Project.toml`
  [6348297c] AlphaVantage v0.4.1
  [336ed68f] CSV v0.10.14
⌃ [a93c6f00] DataFrames v1.3.6
  [31c24e10] Distributions v0.25.109
⌅ [e30172f5] Documenter v0.27.25
  [f6369f11] ForwardDiff v0.10.36
  [b6b21f68] Ipopt v1.6.3
  [c8e1da08] IterTools v1.10.0
  [98b081ad] Literate v2.18.0
⌅ [945b72a4] MarketData v0.13.12
⌅ [961ee093] ModelingToolkit v8.64.0
  [429524aa] Optim v1.9.4
⌃ [7f7a1694] Optimization v3.19.3
⌅ [fd9f6733] OptimizationMOI v0.1.16
⌅ [36348300] OptimizationOptimJL v0.1.14
  [f0f68f2c] PlotlyJS v0.18.13
  [91a5bcdd] Plots v1.40.4
  [f3b207a7] StatsPlots v0.15.7
  [ade2ca70] Dates
  [9a3f8284] Random
  [10745b16] Statistics v1.10.0
Info Packages marked with ⌃ and ⌅ have new versions available. Those with ⌃ may be upgradable, but those with ⌅ are restricted by compatibility constraints from upgrading. To see why use `status --outdated`

```

If you need any other information, I will gladly provide it.

---

<div class="post-metadata">

**Author:** ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Post date:** [June 30, 2024, 2:46pm UTC](https://discourse.julialang.org/t/adding-reinforcementlearning-to-environment-fails-compatibility-issue/116122/5 "2024-06-30T14:46:04Z")

</div>

One option to debug this: First, create an empty project:

```julia
mkdir test
cd test
julia --project="."

```

Then, in Julia:

```julia
using Pkg
Pkg.add("ReinforcementLearning")

```

If that succeeds, add step by step the other packages you need.

If you are lucky, all works well, if not you know which package is lacking compatibility with ReinforcementLearning.
