Can't add GLM

Trying to add GLM and getting dependency errors.
[StatsPlots, Distributions, etc.]

I’m using Julia 1.2 (can’t change for other dependency reasons).

Does anyone have any ideas?

I tried to build but GLM could not be found.

Has GLM been discontinued in Julia? Can anyone suggest an alternative?

Thanks for any help

PS I have built StatsPlots

GLM has not been discontinued. Are you adding this in a new environment?

Thanks for your message
No new environments. Just my basic Julia 1.2 one

you need to post dependency error. but in general, there’s nothing we can do, simply that you have a dependency error and you need to remove some other packages first.

also, might want to try update to Julia 1.5.2

Sorry for not giving specifics earlier - it just seems I keep going in circles:

(v1.2) pkg> add GLM
Resolving package versions…
ERROR: Unsatisfiable requirements detected for package StatsPlots [f3b207a7]:
StatsPlots [f3b207a7] log:
possible versions are: [0.10.0-0.10.2, 0.11.0, 0.12.0, 0.13.0, 0.14.0-0.14.13] or uninstalled
restricted to versions 0.12.0 by an explicit requirement, leaving only versions 0.12.0
restricted by compatibility requirements with Clustering [aaaa29a8] to versions: 0.14.5-0.14.13 or uninstalled no versions left
Clustering [aaaa29a8] log:
possible versions are: [0.10.0, 0.11.0, 0.12.0-0.12.4, 0.13.0-0.13.5, 0.14.0-0.14.1] or uninstalled
restricted to versions 0.14.1 by an explicit requirement, leaving only versions 0.14.1

(v1.2) pkg> add StatsPlots
Resolving package versions…
ERROR: Unsatisfiable requirements detected for package Distributions [31c24e10]:
Distributions [31c24e10] log:
possible versions are: [0.16.0-0.16.4, 0.17.0, 0.18.0, 0.19.1-0.19.2, 0.20.0, 0.21.0-0.21.3, 0.21.5-0.21.12, 0.22.0-0.22.6, 0.23.0-0.23.12] or uninstalled
restricted to versions 0.19.2 by an explicit requirement, leaving only versions 0.19.2
restricted by compatibility requirements with StatsBase [2913bbd2] to versions: 0.23.2-0.23.12 or uninstalled no versions left
StatsBase [2913bbd2] log:
possible versions are: [0.24.0, 0.25.0, 0.26.0, 0.27.0, 0.28.0-0.28.1, 0.29.0, 0.30.0, 0.31.0, 0.32.0-0.32.2, 0.33.0-0.33.1] or uninstalled
restricted to versions 0.33.0 by an explicit requirement, leaving only versions 0.33.0

next time plz format your code but I believe here you need to uninstall Clustering.jl

I tried that, but it didn’t help, I have tried removing/reinstalling/building various combinations of Distributions/StatsBase/StatsPlots but get nowhere

What about a build?

(v1.2) pkg> build GLM
ERROR: The following package names could not be resolved:

  • GLM (not found in project or manifest)
    Please specify by known name=uuid.

build doesn’t work if you don’t even have that package installed, keep reading the dependency error and delete package you see that are not really needed for what you need to do with GLM

Thanks. This is beyond me. It is quicker to write a linear regression package from scratch, which I am doing.

Thanks for trying to help. You are pprobably right about upgrading to 1.5. I did that, but I can’t seem get Jupyter Notebooks to recognise the new Kernel, so I am stuck on 1.2.

By the way, I tried removing every package that it was objecting to, but it didn’t help, and now none of the packages (many of which I rely on) will add!

https://github.com/JuliaStats/GLM.jl/blob/4355bd0905badeff5fa1c10de231cfb5fed209a1/Project.toml#L18-L29

it’s not that complicated, just that sometimes not all packages you want work together.

Now I have uninstalled lots of packages and nothing will add anymore. Maybe this is some of the stuff that was fixed with 1.5?

that doesn’t sounds good…

well, even if 1.5 has some bug fix, 1.2 wasn’t THAT broken. I suggest you 1) update to 1.5 2) understand how PKG works

OK - thanks - I guess I have no choice. I think I understand pkg OK, I just have difficulty when there are lots of mutually incompatible dependencies.

yeah, it’s unfortunate and inevitable to some degree. You just need to read the error, and trace to the pkg that is offending AND you don’t need.

Why are you adding StatsPlots here? You should remove it and see what happens.

I tried that.

While trying to add GLM I had removed a few packages mentioned as being incompatible and not added anything else. Now I can’t add the Packages back that were working fine before, such as StatsBase and Flux. Does anyone one know how to fix this?
When I try to add StatsBase or Flux, there are no other packages mentioned as being incompatible, but they will not load.

Please post the error output and the results of ] st.

(v1.2) pkg> st
Status ~/.julia/environments/v1.2/Project.toml
[c52e3926] Atom v0.12.10
[fbb218c0] BSON v0.2.6
[a134a8b2] BlackBoxOptim v0.5.0
[336ed68f] CSV v0.6.1
[34da2185] Compat v3.8.0
[f65535da] Convex v0.13.3
[a10d1c49] DBInterface v2.0.0
[a93c6f00] DataFrames v0.20.2
[86b6b26d] Evolutionary v0.5.0
[59287772] Formatting v0.4.1
[f6369f11] ForwardDiff v0.10.12
[8d5ece8b] GLMNet v0.4.2
[60bf3e95] GLPK v0.13.0
[28b8d3ca] GR v0.48.0
[939ea78f] GeneralQP v0.0.0 #master (https://github.com/oxfordcontrol/GeneralQP.jl)
[2e9cd046] Gurobi v0.7.7
[7073ff75] IJulia v1.21.2
[b6b21f68] Ipopt v0.6.2
[4138dd39] JLD v0.10.0
[033835bb] JLD2 v0.1.13
[682c06a0] JSON v0.21.0
[4076af6c] JuMP v0.21.2
[51f20bef] JuliaCMAES v0.0.0 #master (https://github.com/Staross/JuliaCMAES.git)
[e5e0dc1b] Juno v0.8.1
[b1bec4e5] LIBSVM v0.4.0
[23992714] MAT v0.7.0
[6f286f6a] MultivariateStats v0.7.0
[39abe10b] MySQL v1.0.2
[429524aa] Optim v0.20.6
[f0f68f2c] PlotlyJS v0.13.1
[91a5bcdd] Plots v1.1.1
[c3e4b0f8] Pluto v0.11.2
[d330b81b] PyPlot v2.9.0
[c946c3f1] SCS v0.6.6
[fd094767] Suppressor v0.2.0
[b8865327] UnicodePlots v1.1.0
[009559a3] XGBoost v0.4.2
[9e88b42a] Serialization
Warning: Some packages (indicated with a red arrow) are not downloaded, use instantiate to instantiate the current environment
@ Pkg.Display /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.2/Pkg/src/Display.jl:229

Thanks

Please also post the error output, and remember to quote your code with backticks

```
like this
```