# Error requiring \`StaticArrays\` from \`ArrayInterface\`

**URL:** <https://discourse.julialang.org/t/error-requiring-staticarrays-from-arrayinterface/67480>\
**Category:** New to Julia\
**Tags:** makie\
**Created:** [September 1, 2021, 8:25am UTC](https://discourse.julialang.org/t/error-requiring-staticarrays-from-arrayinterface/67480 "2021-09-01T08:25:03Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![Empirilogic](https://avatars.discourse-cdn.com/v4/letter/e/919ad9/32.png) [@Empirilogic](https://discourse.julialang.org/u/Empirilogic)\
**Post date:** [September 1, 2021, 8:25am UTC](https://discourse.julialang.org/t/error-requiring-staticarrays-from-arrayinterface/67480/1 "2021-09-01T08:25:03Z")

</div>

I am starting with Makie. I installed Makie and CairoMakie; the editor is VSCode  
I am trying to run the following example, taken from the [juliaplots.org](http://juliaplots.org) website:

```julia
using Makie

x = rand(10)
y = rand(10)
colors = rand(10)
scene = scatter(x, y, color = colors)

```

Whatever I try, I get the following warning + error:

```julia
Warning: Error requiring `StaticArrays` from `ArrayInterface`
│ exception =
│ too many parameters for type

```

etc.etc. (long list)

This is my packages status:

```julia
    Status `~/Tresors/Julia/Project.toml`
  [4fba245c] ArrayInterface v3.1.30
  [a134a8b2] BlackBoxOptim v0.5.0
  [336ed68f] CSV v0.8.5
  [13f3f980] CairoMakie v0.2.4
  [a93c6f00] DataFrames v1.2.2
  [7806a523] DecisionTree v0.10.10
  [31c24e10] Distributions v0.23.8
  [60bf3e95] GLPK v0.14.12
  [a2cc645c] GraphPlot v0.4.4
  [86223c79] Graphs v0.10.3
  [3955a311] GridLayoutBase v0.5.7
  [4076af6c] JuMP v0.21.9
  [aa1ae85d] JuliaInterpreter v0.8.21
  [093fc24a] LightGraphs v1.3.5
  [ee78f7c6] Makie v0.10.0
  [d330b81b] PyPlot v2.9.0
  [3646fa90] ScikitLearn v0.6.4
  [60ddc479] StatPlots v0.9.2
  [90137ffa] StaticArrays v0.12.5
  [fdbf4ff8] XLSX v0.7.6

```

What am I missing or doing wrong?

I hope someone may be able to help out

---

<div class="post-metadata">

**Author:** ![JonasIsensee](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jonasisensee/32/4704_2.png) [@JonasIsensee](https://discourse.julialang.org/u/JonasIsensee)\
**Post date:** [September 1, 2021, 8:43am UTC](https://discourse.julialang.org/t/error-requiring-staticarrays-from-arrayinterface/67480/2 "2021-09-01T08:43:11Z")

</div>

Hi @Empirilogic ,

it looks like some of your packages are quite outdated. What julia version are you on?

Please not that the documentation for `Makie` is here: [Home](http://makie.juliaplots.org/stable/)  
Also, it is recommended to use Makie backends (`GLMakie`, `CairoMakie`, `WGLMakie` directly).

You could try to remove `Makie` and add `CairoMakie`. (The latest release of CairoMakie is `v0.6.5`)

```julia
] rm Makie
] add CairoMakie

```

```julia
using CairoMakie
scatter(rand(10), rand(10), color=rand(10))

```

---

<div class="post-metadata">

**Author:** ![Empirilogic](https://avatars.discourse-cdn.com/v4/letter/e/919ad9/32.png) [@Empirilogic](https://discourse.julialang.org/u/Empirilogic)\
**Post date:** [September 1, 2021, 8:51am UTC](https://discourse.julialang.org/t/error-requiring-staticarrays-from-arrayinterface/67480/3 "2021-09-01T08:51:52Z")

</div>

Hi Jonas, thanks for replying.

I am using Julia 1.6.2.  
I tried your suggestion, without success. using Makie, CairoMakie or using both.  
Removed until I had only Makie or CairoMakie. Not working.  
I forgot to mention I am running VSCode on a Mac.

I agree that the versions are quite old. Odd.

---

<div class="post-metadata">

**Author:** ![JonasIsensee](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jonasisensee/32/4704_2.png) [@JonasIsensee](https://discourse.julialang.org/u/JonasIsensee)\
**Post date:** [September 1, 2021, 8:56am UTC](https://discourse.julialang.org/t/error-requiring-staticarrays-from-arrayinterface/67480/4 "2021-09-01T08:56:10Z")

</div>

Hi @Empirilogic,

it could very well be that some of the other packages are holding up the version update.  
Just to verify, did you restart julia after installing the new `CairoMakie` ?

Try installing `CairoMakie` into a new environment, e.g. :

```julia
using Pkg
Pkg.activate(; temp=true)
Pkg.add("CairoMakie")
using CairoMakie
scatter(rand(10), rand(10), color=rand(10))

```

---

<div class="post-metadata">

**Author:** ![Sukera](https://avatars.discourse-cdn.com/v4/letter/s/ce7236/32.png) [@Sukera](https://discourse.julialang.org/u/Sukera)\
**Post date:** [September 1, 2021, 8:58am UTC](https://discourse.julialang.org/t/error-requiring-staticarrays-from-arrayinterface/67480/5 "2021-09-01T08:58:40Z")

</div>

> [@Empirilogic](#):
>
> ` [ee78f7c6] Makie v0.10.0`

Can you try to `]add Makie@v0.15.2` (the most recent version)? That should tell us what is holding it back, should that be the case.

---

<div class="post-metadata">

**Author:** ![Empirilogic](https://avatars.discourse-cdn.com/v4/letter/e/919ad9/32.png) [@Empirilogic](https://discourse.julialang.org/u/Empirilogic)\
**Post date:** [September 1, 2021, 9:04am UTC](https://discourse.julialang.org/t/error-requiring-staticarrays-from-arrayinterface/67480/6 "2021-09-01T09:04:07Z")

</div>

That worked in the temp environment. Install went well and graph plotted

---

<div class="post-metadata">

**Author:** ![Empirilogic](https://avatars.discourse-cdn.com/v4/letter/e/919ad9/32.png) [@Empirilogic](https://discourse.julialang.org/u/Empirilogic)\
**Post date:** [September 1, 2021, 9:05am UTC](https://discourse.julialang.org/t/error-requiring-staticarrays-from-arrayinterface/67480/7 "2021-09-01T09:05:32Z")

</div>

> [@Sukera](#):
>
> `]add Makie@v0.15.2`

Good tip. I got this:

(Julia) pkg\> add Makie@v0.15.2  
Updating registry at `~/.julia/registries/General`  
Resolving package versions…  
ERROR: Unsatisfiable requirements detected for package PlotUtils [995b91a9]:  
PlotUtils [995b91a9] log:  
├─possible versions are: 0.5.0-1.0.13 or uninstalled  
├─restricted by compatibility requirements with Makie [ee78f7c6] to versions: 1.0.0-1.0.13  
│ └─Makie [ee78f7c6] log:  
│ ├─possible versions are: 0.9.0-0.15.2 or uninstalled  
│ └─restricted to versions 0.15.2 by an explicit requirement, leaving only versions 0.15.2  
└─restricted by compatibility requirements with Plots [91a5bcdd] to versions: 0.5.0-0.6.5 — no versions left  
└─Plots [91a5bcdd] log:  
├─possible versions are: 0.12.1-1.21.2 or uninstalled  
├─restricted by compatibility requirements with StatPlots [60ddc479] to versions: 0.14.0-0.29.9  
│ └─StatPlots [60ddc479] log:  
│ ├─possible versions are: 0.8.0-0.9.2 or uninstalled  
│ └─restricted to versions \* by an explicit requirement, leaving only versions 0.8.0-0.9.2  
└─restricted by compatibility requirements with FixedPointNumbers [53c48c17] to versions: 0.25.0-1.21.2 or uninstalled, leaving only versions: 0.25.0-0.29.9  
└─FixedPointNumbers [53c48c17] log:  
├─possible versions are: 0.5.0-0.8.4 or uninstalled  
└─restricted by compatibility requirements with Makie [ee78f7c6] to versions: 0.6.0-0.8.4  
└─Makie [ee78f7c6] log: see above

---

<div class="post-metadata">

**Author:** ![Empirilogic](https://avatars.discourse-cdn.com/v4/letter/e/919ad9/32.png) [@Empirilogic](https://discourse.julialang.org/u/Empirilogic)\
**Post date:** [September 1, 2021, 9:10am UTC](https://discourse.julialang.org/t/error-requiring-staticarrays-from-arrayinterface/67480/8 "2021-09-01T09:10:40Z")

</div>

Plots is installed, but not in the status list:

```julia
julia> using Plots

julia> using PlotUtils
ERROR: ArgumentError: Package PlotUtils not found in current path:
- Run `import Pkg; Pkg.add("PlotUtils")` to install the PlotUtils package.

```

PlotUtils is not installed

---

<div class="post-metadata">

**Author:** ![Empirilogic](https://avatars.discourse-cdn.com/v4/letter/e/919ad9/32.png) [@Empirilogic](https://discourse.julialang.org/u/Empirilogic)\
**Post date:** [September 1, 2021, 9:12am UTC](https://discourse.julialang.org/t/error-requiring-staticarrays-from-arrayinterface/67480/9 "2021-09-01T09:12:00Z")

</div>

Can I clean the apparent mess by reinstalling Julia? Does that help for the toml files?  
Earlier, I installed Jupyter for working with Julia (required MiniConda). Maybe the PATH has something to do with it

---

<div class="post-metadata">

**Author:** ![Sukera](https://avatars.discourse-cdn.com/v4/letter/s/ce7236/32.png) [@Sukera](https://discourse.julialang.org/u/Sukera)\
**Post date:** [September 1, 2021, 9:30am UTC](https://discourse.julialang.org/t/error-requiring-staticarrays-from-arrayinterface/67480/10 "2021-09-01T09:30:48Z")

</div>

You have a lot of different plotting packages in the same environment that share a dependency (PlotUtils). Since only one version of a dependency can be loaded at any given time, a common state is found by downgrading versions until they’re compatible. This may not give you the most recent version of packages and the fact that a lot of packages don’t want to commit to a 1.x doesn’t help here.

If you’re just trying out plotting packages, I’d recommend familiarizing yourself with [Pkg environments](https://pkgdocs.julialang.org/dev/environments/) to seperate experimentation and different projects.

> [@Empirilogic](#):
>
> Can I clean the apparent mess by reinstalling Julia? Does that help for the toml files?

There’s no need to reinstall julia. It’s just a package environment that has old versions due to dependency management.

> [@Empirilogic](#):
>
> Earlier, I installed Jupyter for working with Julia (required MiniConda). Maybe the PATH has something to do with it

No, the PATH is not touched by julia. Julia usually handles those packages (and especially python dependencies) in a seperate environment, to make sure they don’t mess with the system version (unless you explicitly ask for the system version to be used).

---

<div class="post-metadata">

**Author:** ![Empirilogic](https://avatars.discourse-cdn.com/v4/letter/e/919ad9/32.png) [@Empirilogic](https://discourse.julialang.org/u/Empirilogic)\
**Post date:** [September 1, 2021, 9:37am UTC](https://discourse.julialang.org/t/error-requiring-staticarrays-from-arrayinterface/67480/11 "2021-09-01T09:37:01Z")

</div>

Thanks. I was indeed checking capabilities and ease of use of plotting packages. I am coming from R and I am quite impressed with Julia.  
I will use the environments in the future for testing purposes.

I will remove all plotting packages besides Plots and CairoMakie. See if I can install Makie 0.15.2

---

<div class="post-metadata">

**Author:** ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)\
**Post date:** [September 1, 2021, 9:39am UTC](https://discourse.julialang.org/t/error-requiring-staticarrays-from-arrayinterface/67480/12 "2021-09-01T09:39:14Z")

</div>

Just to be sure don’t just use environments for testing purposes, but use them for everything - when you start some new project give it it’s own folder, `] activate` an environment in that folder, and add the packages you need. Then when you go back to that project in a few weeks/months/years time, the `Project.toml` and `Manifest.toml` files will still be there to ensure your code still runs, and isn’t broken because of some package updates that happened in the meantime. Having this built into the language and so easily accessible is one of the big benefits of Julia imho.

---

<div class="post-metadata">

**Author:** ![Sukera](https://avatars.discourse-cdn.com/v4/letter/s/ce7236/32.png) [@Sukera](https://discourse.julialang.org/u/Sukera)\
**Post date:** [September 1, 2021, 9:46am UTC](https://discourse.julialang.org/t/error-requiring-staticarrays-from-arrayinterface/67480/13 "2021-09-01T09:46:59Z")

</div>

Yes exactly. It will also prevent cross-contamination of dependencies from happening between different projects of yours.

Think like this: Project `A` requires some package `B` at version 0.3, which requires Package `C` at version \<=0.2. Project `A1` requires package `B` at version 0.4, which requires Package `C` at version \>1. If you have two environments, one for Project `A` and one for `A1`, you can work in them seperately and they won’t interfere. If, however, you use the same environment for both of them, things won’t work for one of the two projects because you can’t have both `C@v1` and `C@v0.2` active at the same time.

---

<div class="post-metadata">

**Author:** ![Empirilogic](https://avatars.discourse-cdn.com/v4/letter/e/919ad9/32.png) [@Empirilogic](https://discourse.julialang.org/u/Empirilogic)\
**Post date:** [September 1, 2021, 9:59am UTC](https://discourse.julialang.org/t/error-requiring-staticarrays-from-arrayinterface/67480/14 "2021-09-01T09:59:25Z")

</div>

> [@JonasIsensee](#):
>
> `scatter(rand(10), rand(10), color=rand(10))`

Thank you @Sukera and @nilshg  
That prevent so many problems by the rookie mistakes I will make. I will read up about using environments in Julia.

I removed the majority of plotting packages, Makie 0.15.2 and CairoMakie 0.6.5 install successfully and plots are being made!

---

<div class="post-metadata">

**Author:** ![Elrod](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/elrod/32/22461_2.png) [@Elrod](https://discourse.julialang.org/u/Elrod)\
**Post date:** [September 1, 2021, 12:36pm UTC](https://discourse.julialang.org/t/error-requiring-staticarrays-from-arrayinterface/67480/15 "2021-09-01T12:36:45Z")

</div>

> [@Empirilogic](#):
>
> etc.etc. (long list)

The first line number would help.  
ArrayInterface already [has a check to avoid this error](https://github.com/JuliaArrays/ArrayInterface.jl/blob/f8d1182f4f6473ddad1fa37aa2c043d9692ca01b/src/ArrayInterface.jl#L767):

```julia
if StaticArrays.SizedArray{Tuple{8,8},Float64,2,2} isa UnionAll
  @inline strides(B::StaticArrays.SizedArray{S,T,M,N,A}) where {S,T,M,N,A<:SubArray} = strides(B.data)
  parent_type(::Type{<:StaticArrays.SizedArray{S,T,M,N,A}}) where {S,T,M,N,A} = A
else
  parent_type(::Type{<:StaticArrays.SizedArray{S,T,M,N}}) where {S,T,M,N} =
    Array{T,N}
end

```

and used to work with StaticArrays 0.12.5.  
So I’d like to have some idea of whether this check is now failing for some reason, or whether some code has been added since then that is incompatible with StaticArrays 0.12.5.

I think we should have one last version of ArrayInterface using StaticArrays 0.12.5, and then drop support for it in the next version to avoid problems like this.

---

<div class="post-metadata">

**Author:** ![Empirilogic](https://avatars.discourse-cdn.com/v4/letter/e/919ad9/32.png) [@Empirilogic](https://discourse.julialang.org/u/Empirilogic)\
**Post date:** [September 2, 2021, 8:57am UTC](https://discourse.julialang.org/t/error-requiring-staticarrays-from-arrayinterface/67480/16 "2021-09-02T08:57:38Z")

</div>

Hi Elrod,

I don’t know how to help here. Just started with Julia. My problem was solved by removing packages that prevented updating Makie and CairoMakie. Versions having the issue are: Makie 0.10.0 and CairoMakie 0.2.4
