# When I upgrade one package, another package will be downgraded. How to solve this problem?

**URL:** https://discourse.julialang.org/t/when-i-upgrade-one-package-another-package-will-be-downgraded-how-to-solve-this-problem/106292
**Category:** Optimization (Mathematical)
**Tags:** package
**Created:** [November 16, 2023, 3:30am UTC](https://discourse.julialang.org/t/when-i-upgrade-one-package-another-package-will-be-downgraded-how-to-solve-this-problem/106292 "2023-11-16T03:30:54Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![wang\_ruoxu](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wang_ruoxu/32/203954_2.png) [@wang\_ruoxu](https://discourse.julialang.org/u/wang_ruoxu)
#### Post date: [November 16, 2023, 3:30am UTC](https://discourse.julialang.org/t/when-i-upgrade-one-package-another-package-will-be-downgraded-how-to-solve-this-problem/106292/1 "2023-11-16T03:30:54Z")

</div>

When I upgrade SDDP@1.6.6,the will degrade ScenTrees@0.1.1，When I upgrade ScenTrees@0.3.3,the will degrade SDDP@0.4.6.What can I do to make both versions exist at the same time?  
I need to use these two packages at the same time, so I can’t build different environments to use them.I use python to call them at the same time on the notebook。  
SDDP has no compatibility requirements for the ScenTrees version. I don’t know how to modify the toml file.  
I’m so helpless right now and need help

![image](https://global.discourse-cdn.com/julialang/original/3X/f/8/f8b6c140f25861ff3c93e46d681cd78a5466e2fb.png)  
julia\> versioninfo()  
Julia Version 1.7.3  
Commit 742b9abb4d (2022-05-06 12:58 UTC)  
Platform Info:  
OS: Linux (x86\_64-pc-linux-gnu)  
CPU: Intel(R) Core™ i7-10700K CPU @ 3.80GHz  
WORD\_SIZE: 64  
LIBM: libopenlibm  
LLVM: libLLVM-12.0.1 (ORCJIT, skylake)  
Environment:  
JULIA\_PKG\_SERVER = [北京大学开源镜像站](https://mirrors.pku.edu.cn/julia)

---

<div class="post-metadata">

### Author: ![odow](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/odow/32/28685_2.png) [@odow](https://discourse.julialang.org/u/odow)
#### Post date: [November 16, 2023, 3:44am UTC](https://discourse.julialang.org/t/when-i-upgrade-one-package-another-package-will-be-downgraded-how-to-solve-this-problem/106292/2 "2023-11-16T03:44:11Z")

</div>

Hi @wang_ruoxu, welcome to the forum.

This is happening because you cannot use the latest versions of ScenTrees and SDDP. It’s a little confusing because you’re right, there is no dependency between them, but there are transitive dependencies.

In this case, it is because ScenTrees is limited to an old version of DataFrames.jl. I’ve opened a PR to update the compat bounds in ScenTrees: [Update compat bounds in Project.toml by odow · Pull Request #20 · kirui93/ScenTrees.jl · GitHub](https://github.com/kirui93/ScenTrees.jl/pull/20)

You can try it out with:

```julia
] add https://github.com/odow/ScenTrees.jl#patch-1

```

p.s. you can get a more helpful message by trying to force the package manager to install both packages at the same time:

```julia
(sdd) pkg> add SDDP@1 ScenTrees@0.3
    Updating registry at `~/.julia/registries/General`
    Updating git-repo `https://github.com/JuliaRegistries/General.git`
   Resolving package versions...
ERROR: Unsatisfiable requirements detected for package DataFrames [a93c6f00]:
 DataFrames [a93c6f00] log:
 ├─possible versions are: 0.11.7-1.6.1 or uninstalled
 ├─restricted by compatibility requirements with ScenTrees [4ec4db44] to versions: 0.21.0-0.21.8
 │ └─ScenTrees [4ec4db44] log:
 │ ├─possible versions are: 0.1.0-0.3.3 or uninstalled
 │ └─restricted to versions 0.3 by an explicit requirement, leaving only versions 0.3.0-0.3.3
 └─restricted by compatibility requirements with Reexport [189a3867] to versions: 0.22.3-1.6.1 or uninstalled — no versions left
   └─Reexport [189a3867] log:
     ├─possible versions are: 0.2.0-1.2.2 or uninstalled
     └─restricted by compatibility requirements with SDDP [f4570300] to versions: 1.0.0-1.2.2
       └─SDDP [f4570300] log:
         ├─possible versions are: 0.1.0-1.6.6 or uninstalled
         └─restricted to versions 1 by an explicit requirement, leaving only versions 1.0.0-1.6.6

```

---

<div class="post-metadata">

### Author: ![wang\_ruoxu](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wang_ruoxu/32/203954_2.png) [@wang\_ruoxu](https://discourse.julialang.org/u/wang_ruoxu)
#### Post date: [November 16, 2023, 6:19am UTC](https://discourse.julialang.org/t/when-i-upgrade-one-package-another-package-will-be-downgraded-how-to-solve-this-problem/106292/3 "2023-11-16T06:19:32Z")

</div>

hi,bro,thank you !this solved it.  
 ![image](https://global.discourse-cdn.com/julialang/original/3X/6/6/66bca62a6fc83f18c4752d4bf267c69c688a079e.png)
