# How come I can't install the latest version of StatsBase?

**URL:** <https://discourse.julialang.org/t/how-come-i-cant-install-the-latest-version-of-statsbase/23435>\
**Category:** New to Julia\
**Created:** [April 23, 2019, 10:56am UTC](https://discourse.julialang.org/t/how-come-i-cant-install-the-latest-version-of-statsbase/23435 "2019-04-23T10:56:45Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![xiaodai](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/xiaodai/32/15937_2.png) [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Post date:** [April 23, 2019, 10:56am UTC](https://discourse.julialang.org/t/how-come-i-cant-install-the-latest-version-of-statsbase/23435/1 "2019-04-23T10:56:45Z")

</div>

I am running Julia 1.1 and Windows 10. I can’t seem to install StatsBase 0.30 as I get this error when I `]pin StatsBase@0.30`.

The error seems to suggest that Optim.jl restricts StatsBase to 0.29 but when I looked at the REQUIRE for Optim.jl it simply says StatsBase without specifying a version. So what’s stopping the upgrade? I can remove Optim and whatever other package but then why can’t I just upgrade StatsBase?

```julia
ERROR: Unsatisfiable requirements detected for package StatsBase [2913bbd2]:
 StatsBase [2913bbd2] log:
 ├─possible versions are: [0.1.0, 0.2.0-0.2.1, 0.2.3-0.2.10, 0.3.0-0.3.13, 0.4.0-0.4.4, 0.5.0-0.5.3, 0.6.0-0.6.16, 0.7.0-0.7.4, 0.8.0-0.8.3, 0.9.0, 0.10.0, 0.11.0-0.11.1, 0.12.0, 0.13.0-0.13.1, 0.14.0-0.14.1, 0.15.0, 0.16.0-0.16.1, 0.17.0, 0.18.0, 0.19.0-0.19.5, 0.20.0-0.20.1, 0.22.0, 0.23.0-0.23.1, 0.24.0, 0.25.0, 0.26.0, 0.27.0, 0.28.0-0.28.1, 0.29.0, 0.30.0] or uninstalled
 ├─restricted to versions 0.30 by an explicit requirement, leaving only versions 0.30.0
 └─restricted by compatibility requirements with Optim [429524aa] to versions: [0.1.0, 0.2.0-0.2.1, 0.2.3-0.2.10, 0.3.0-0.3.13, 0.4.0-0.4.4, 0.5.0-0.5.3, 0.6.0-0.6.16, 0.7.0-0.7.4, 0.8.0-0.8.3, 0.9.0, 0.10.0, 0.11.0-0.11.1, 0.12.0, 0.13.0-0.13.1, 0.14.0-0.14.1, 0.15.0, 0.16.0-0.16.1, 0.17.0, 0.18.0, 0.19.0-0.19.5, 0.20.0-0.20.1, 0.22.0, 0.23.0-0.23.1, 0.24.0, 0.25.0, 0.26.0, 0.27.0, 0.28.0-0.28.1, 0.29.0] — no versions left
   └─Optim [429524aa] log:
     ├─possible versions are: [0.1.0-0.1.7, 0.2.0, 0.3.0-0.3.1, 0.4.0-0.4.7, 0.5.0, 0.6.0-0.6.1, 0.7.0-0.7.5, 0.7.7-0.7.8, 0.9.0-0.9.3, 0.10.0-0.10.1, 0.11.0, 0.12.0, 0.13.0, 0.14.0-0.14.1, 0.15.0-0.15.3, 0.16.0, 0.17.0-0.17.2, 0.18.0-0.18.1] or uninstalled
     └─restricted to versions 0.18.1 by an explicit requirement, leaving only versions 0.18.1

```

---

<div class="post-metadata">

**Author:** ![jonathanBieler](https://avatars.discourse-cdn.com/v4/letter/j/82dd89/32.png) [@jonathanBieler](https://discourse.julialang.org/u/jonathanBieler)\
**Post date:** [April 23, 2019, 11:44am UTC](https://discourse.julialang.org/t/how-come-i-cant-install-the-latest-version-of-statsbase/23435/2 "2019-04-23T11:44:20Z")

</div>

I think the problem is that StatsBase has migrated to the new `Project.toml` based system but not Optim. I think you either have to add a `Project.toml` to your Optim copy or remove the one in StatsBase.

---

<div class="post-metadata">

**Author:** ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)\
**Post date:** [April 23, 2019, 11:59am UTC](https://discourse.julialang.org/t/how-come-i-cant-install-the-latest-version-of-statsbase/23435/3 "2019-04-23T11:59:45Z")

</div>

That should not matter.

The problem is that Optim does not support StatsBase 0.30 (according to the registry): [https://github.com/JuliaRegistries/General/blob/37cf47c862d8ae34197d14cf52741965e2c9f658/O/Optim/Compat.toml#L44](https://github.com/JuliaRegistries/General/blob/37cf47c862d8ae34197d14cf52741965e2c9f658/O/Optim/Compat.toml#L44)

---

<div class="post-metadata">

**Author:** ![xiaodai](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/xiaodai/32/15937_2.png) [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Post date:** [April 28, 2019, 2:45am UTC](https://discourse.julialang.org/t/how-come-i-cant-install-the-latest-version-of-statsbase/23435/4 "2019-04-28T02:45:53Z")

</div>

It seems to be resolved now.

---

<div class="post-metadata">

**Author:** ![Ajaychat3](https://avatars.discourse-cdn.com/v4/letter/a/ecd19e/32.png) [@Ajaychat3](https://discourse.julialang.org/u/Ajaychat3)\
**Post date:** [April 28, 2019, 4:59am UTC](https://discourse.julialang.org/t/how-come-i-cant-install-the-latest-version-of-statsbase/23435/5 "2019-04-28T04:59:06Z")

</div>

In my case, it was due to Distributions package. I first installed Distributions and the version got installed was 0.19. When I tried to install StatsBase, it gave a similar error. So I removed Distributions and then reinstalled StatsBase. It went fine. Subsequently I reinstalled Distributions and the package version installed is 0.18.
