Pluto.jl icon indicating copy to clipboard operation
Pluto.jl copied to clipboard

Pluto fails to upgrade to version 0.19.11

Open VivaldoMendes opened this issue 2 years ago • 11 comments

Hi,

I am on Windows machine, using Julia 1.7.3. I have Pluto 0.19.9 installed and tried to upgrade to version 0.19.11, but failed.

Worried about possible conflicts with some packages I created a new environment with a small number of packages. These are the packages I have installed:

(macroI) pkg> st
     Project macroI v0.1.0
      Status `C:\Users\Utilizador\macroI\Project.toml`
  [336ed68f] CSV v0.10.4
  [e2554f3b] Clp v1.0.1
  [35d6a980] ColorSchemes v3.19.0
  [a93c6f00] DataFrames v1.3.4
  [60bf3e95] GLPK v1.0.1
  [cd3eb016] HTTP v0.9.17
  [ac1192a8] HypertextLiteral v0.9.4
  [b6b21f68] Ipopt v1.0.3
  [4076af6c] JuMP v1.1.1
  [b964fa9f] LaTeXStrings v1.3.0
  [2774e3e8] NLsolve v4.5.1
  [276e7ca9] PeriodicalDates v2.0.0
  [a03496cd] PlotlyBase v0.8.18
  [f0f68f2c] PlotlyJS v0.18.8
  [91a5bcdd] Plots v1.31.4
  [c3e4b0f8] Pluto v0.19.9
  [b0e4dd01] RollingFunctions v0.6.2
  [2913bbd2] StatsBase v0.33.20
  [0c5d862f] Symbolics v4.10.3
  [9e3dc215] TimeSeries v0.23.0
  [ade2ca70] Dates
  [37e2e46d] LinearAlgebra
  [9a3f8284] Random
  [2f01184e] SparseArrays
  [10745b16] Statistics

When I try to force the installation of the newest version of Pluto, this is the error I geT:

(macroI) pkg> add  https://github.com/fonsp/Pluto.jl
    Updating git-repo `https://github.com/fonsp/Pluto.jl`
   Resolving package versions...
ERROR: Unsatisfiable requirements detected for package WebSockets [104b5d7c]:
 WebSockets [104b5d7c] log:
 ├─possible versions are: 1.0.0-1.5.9 or uninstalled
 ├─restricted by compatibility requirements with HTTP [cd3eb016] to versions: uninstalled
 │ └─HTTP [cd3eb016] log:
 │   ├─possible versions are: 0.6.10-1.2.0 or uninstalled
 │   └─restricted to versions 1.0.2-1 by Pluto [c3e4b0f8], leaving only versions 1.0.2-1.2.0
 │     └─Pluto [c3e4b0f8] log:
 │       ├─possible versions are: 0.19.11 or uninstalled
 │       └─Pluto [c3e4b0f8] is fixed to version 0.19.11
 └─restricted by compatibility requirements with Blink [ad839575] to versions: 1.0.0-1.5.9 — no versions left
   └─Blink [ad839575] log:
     ├─possible versions are: 0.8.0-0.12.5 or uninstalled
     └─restricted by compatibility requirements with PlotlyJS [f0f68f2c] to versions: 0.8.0-0.12.5
       └─PlotlyJS [f0f68f2c] log:
         ├─possible versions are: 0.11.0-0.18.8 or uninstalled
         └─restricted to versions * by macroI [303f112c], leaving only versions 0.11.0-0.18.8
           └─macroI [303f112c] log:
             ├─possible versions are: 0.1.0 or uninstalled
             └─macroI [303f112c] is fixed to version 0.1.0

Hope this helps in tracking down the bug. THanks.

VivaldoMendes avatar Jul 29 '22 14:07 VivaldoMendes

Nice issue. Your error and package versions make it very clear what's going on. The problem seems to be that it's still a pretty big environment and specifically the problem is with HTTP.jl 1.0. Can you make the environment smaller? Pluto will not really benefit from packages in the global environment because each notebook will start in a new process anyway.

rikhuijzer avatar Jul 29 '22 14:07 rikhuijzer

Thanks for your prompt reply.

If I rm HTTP from my small environment, some error still remains. Perhaps, the problem is related to PlotlyJS, but this is a critical package in this environment: I can not do without it. Actually, this is for teaching, and it will be hard to move on without HTTP as well.

Please find below what the REPL spits out:

(macroI) pkg> rm HTTP
    Updating `C:\Users\Utilizador\macroI\Project.toml`
  [cd3eb016] - HTTP v0.9.17
  No Changes to `C:\Users\Utilizador\macroI\Manifest.toml`

(macroI) pkg> add https://github.com/fonsp/Pluto.jl
    Updating git-repo `https://github.com/fonsp/Pluto.jl`
   Resolving package versions...
ERROR: Unsatisfiable requirements detected for package WebSockets [104b5d7c]:
 WebSockets [104b5d7c] log:
 ├─possible versions are: 1.0.0-1.5.9 or uninstalled
 ├─restricted by compatibility requirements with HTTP [cd3eb016] to versions: uninstalled
 │ └─HTTP [cd3eb016] log:
 │   ├─possible versions are: 0.6.10-1.2.0 or uninstalled
 │   └─restricted to versions 1.0.2-1 by Pluto [c3e4b0f8], leaving only versions 1.0.2-1.2.0
 │     └─Pluto [c3e4b0f8] log:
 │       ├─possible versions are: 0.19.11 or uninstalled
 │       └─Pluto [c3e4b0f8] is fixed to version 0.19.11
 └─restricted by compatibility requirements with Blink [ad839575] to versions: 1.0.0-1.5.9 — no versions left
   └─Blink [ad839575] log:
     ├─possible versions are: 0.8.0-0.12.5 or uninstalled
     └─restricted by compatibility requirements with PlotlyJS [f0f68f2c] to versions: 0.8.0-0.12.5
       └─PlotlyJS [f0f68f2c] log:
         ├─possible versions are: 0.11.0-0.18.8 or uninstalled
         └─restricted to versions * by macroI [303f112c], leaving only versions 0.11.0-0.18.8
           └─macroI [303f112c] log:
             ├─possible versions are: 0.1.0 or uninstalled
             └─macroI [303f112c] is fixed to version 0.1.0

VivaldoMendes avatar Jul 29 '22 15:07 VivaldoMendes

Why do all these packages have to be in the environment? Do you have some code somewhere?

rikhuijzer avatar Jul 29 '22 15:07 rikhuijzer

You can create a new empty environment with only [email protected] and then launch notebooks with it. These notebooks can then use any other environments like macroI for example.

Pangoraw avatar Jul 29 '22 15:07 Pangoraw

I will need all of them in a course I teach every year. The only ones I could do without are Plots and one of the optimizers. This is for teaching macroeconomics to undergrad students, and I have to keep it simple. I am afraid that it will blow everything apart if I start playing with environments next to undergrad students in economics -- who have their first encounter with Julia and Pluto on this occasion. I myself am not sure I understand the logic of having an environment with one single package that uses packages installed in a different environment. If you say so, I am sure it works, but I am afraid that my colleagues (who prefer something else in terms of language) will not find it very user-friendly.

VivaldoMendes avatar Jul 29 '22 15:07 VivaldoMendes

Another option is waiting for a new version in WebSockets.jl to be tagged (https://github.com/JuliaWeb/WebSockets.jl/commit/7688eea76361cf1ccfe8481c413958d1e99bfce4)

Pangoraw avatar Jul 29 '22 16:07 Pangoraw

Thanks for helping. The best option may be to wait until the conflict with WebSockets becomes solved.

VivaldoMendes avatar Jul 29 '22 17:07 VivaldoMendes

Sorry for coming back again with the same issue.

I tried to figure out what package was causing the downgrading of Pluto. As mentioned, I had rm HTTP.jl, but nothing changed.

So I created a fresh new environment where I firstly installed Pluto. Then I installed PlotlyJS, and it is clear that this is the package that causes the downgrading:

↓ Pluto v0.19.11 ⇒ v0.19.9
↓ HTTP v1.2.0 ⇒ v0.9.17

Please see the details below. Picking up @Pangoraw 's comment, do you think this problem can be overcome with a new version of WebSockets or is it more structurally related to the lack of upgrading of PlotlyJS? This is quite critical for me because I have two entire courses built on top of PlotlyJS and Pluto (actually, using a turnaround developed by @disberd).

Thanks

(macro8674) pkg> add PlotlyJS
   Resolving package versions...
    Updating `C:\Users\Utilizador\macro8674\Project.toml`
  [f0f68f2c] + PlotlyJS v0.18.8
  [c3e4b0f8] ↓ Pluto v0.19.11 ⇒ v0.19.9
    Updating `C:\Users\Utilizador\macro8674\Manifest.toml`
  [bf4720bc] + AssetRegistry v0.1.0
  [9e28174c] + BinDeps v1.0.2
  [ad839575] + Blink v0.12.5
  [d360d2e6] + ChainRulesCore v1.15.3
  [9e997f8a] + ChangesOfVariables v0.1.4
  [944b1d66] - CodecZlib v0.7.0
  [35d6a980] + ColorSchemes v3.19.0
  [3da002f7] + ColorTypes v0.11.4
  [c3611d14] + ColorVectorSpace v0.9.9
  [5ae59095] + Colors v0.12.8
  [34da2185] + Compat v4.1.0
  [ffbed154] + DocStringExtensions v0.8.6
  [53c48c17] + FixedPointNumbers v0.8.4
  [de31a74c] + FunctionalCollections v0.5.0
  [cd3eb016] ↓ HTTP v1.2.0 ⇒ v0.9.17
  [9fb69e20] + Hiccup v0.2.2
  [3587e190] + InverseFunctions v0.1.7
  [92d709cd] + IrrationalConstants v0.1.1
  [692b3bcd] + JLLWrappers v1.4.1
  [97c1335a] + JSExpr v0.5.4
  [682c06a0] + JSON v0.21.3
  [b964fa9f] + LaTeXStrings v1.3.0
  [50d2b5c4] + Lazy v0.15.1
  [2ab3a3ac] + LogExpFunctions v0.3.17
  [e6f89c97] - LoggingExtras v0.4.9
  [1914dd2f] + MacroTools v0.5.9
  [ffc61752] + Mustache v1.0.14
  [a975b10e] + Mux v0.7.6
  [510215fc] + Observables v0.5.1
  [d96e819e] + Parameters v0.12.3
  [69de0a69] + Parsers v2.3.2
  [fa939f87] + Pidfile v1.3.0
  [a03496cd] + PlotlyBase v0.8.18
  [f0f68f2c] + PlotlyJS v0.18.8
  [c3e4b0f8] ↓ Pluto v0.19.11 ⇒ v0.19.9
  [21216c6a] + Preferences v1.3.0
  [189a3867] + Reexport v1.2.2
  [ae029012] + Requires v1.3.0
  [777ac1f9] - SimpleBufferStream v1.1.0
  [276daf66] + SpecialFunctions v2.1.7
  [62fd8b95] + TensorCore v0.1.1
  [3bb67fe8] - TranscodingStreams v0.9.6
  [30578b45] + URIParser v0.4.1
  [3a884ed6] + UnPack v1.0.2
  [0f1e0344] + WebIO v0.8.18
  [104b5d7c] + WebSockets v1.5.9
  [cc8bc4a8] + Widgets v0.6.6
  [f7e6163d] + Kaleido_jll v0.2.1+0
  [efe28fd5] + OpenSpecFun_jll v0.5.5+0
  [8bb1440f] + DelimitedFiles
  [a63ad114] + Mmap
  [2f01184e] + SparseArrays
  [10745b16] + Statistics
  [05823500] + OpenLibm_jll
Precompiling project...
  10 dependencies successfully precompiled in 18 seconds (62 already precompiled)

VivaldoMendes avatar Jul 29 '22 18:07 VivaldoMendes

You could try to add the WebSockets.jl commit which has the [email protected] compat bound:

(macroI)> add https://github.com/JuliaWeb/WebSockets.jl#7688eea76361cf1ccfe8481c413958d1e99bfce4

Pangoraw avatar Jul 29 '22 18:07 Pangoraw

@Pangoraw , thanks a lot.

Following your instructions, the installation of WebSockets.jl went smoothly.: v.1.5.10

However, the upgrade of Pluto to v.0.19.11 was still not allowed. Should I raise an issue next to PlotlyJS?

(macroI) pkg> add https://github.com/fonsp/Pluto.jl
    Updating git-repo `https://github.com/fonsp/Pluto.jl`
   Resolving package versions...
ERROR: Unsatisfiable requirements detected for package Mux [a975b10e]:
 Mux [a975b10e] log:
 ├─possible versions are: 0.4.0-0.7.6 or uninstalled
 ├─restricted by compatibility requirements with HTTP [cd3eb016] to versions: uninstalled
 │ └─HTTP [cd3eb016] log:
 │   ├─possible versions are: 0.6.10-1.2.0 or uninstalled
 │   └─restricted to versions 1.0.2-1 by Pluto [c3e4b0f8], leaving only versions 1.0.2-1.2.0
 │     └─Pluto [c3e4b0f8] log:
 │       ├─possible versions are: 0.19.11 or uninstalled
 │       └─Pluto [c3e4b0f8] is fixed to version 0.19.11
 └─restricted by compatibility requirements with Blink [ad839575] to versions: 0.4.0-0.7.6 — no versions left
   └─Blink [ad839575] log:
     ├─possible versions are: 0.8.0-0.12.5 or uninstalled
     └─restricted by compatibility requirements with PlotlyJS [f0f68f2c] to versions: 0.8.0-0.12.5
       └─PlotlyJS [f0f68f2c] log:
         ├─possible versions are: 0.11.0-0.18.8 or uninstalled
         └─restricted to versions * by macroI [303f112c], leaving only versions 0.11.0-0.18.8
           └─macroI [303f112c] log:
             ├─possible versions are: 0.1.0 or uninstalled
             └─macroI [303f112c] is fixed to version 0.1.0

VivaldoMendes avatar Jul 29 '22 19:07 VivaldoMendes

I had this issue because I'm lazy and kept PlotlyJS and Pluto in my v1.7 environment. I needed Pluto v0.19.10 because it had a fix to the present mode. This finally forced me to make a separate project just for Pluto (which really does make sense, especially since that under normal operation Pluto runs in the repl and stops you from doing anything else!). But I'm still lazy so I made a function for my .bashrc

function pluto {
    julia --project=@pluto -e "import Pkg; Pkg.add(\"Pluto\"); import Pluto; Pluto.run()"
}

so I just type pluto in bash, and I get a Pluto server running the latest version. I'm sure something similar could be written for various other terminals/OSes. I realise this probably doesn't fix your specific problem, but it may help other people coming to this issue.

jondea avatar Jul 31 '22 21:07 jondea

@VivaldoMendes I looked into deps of PlotlyJS, and found Blink.jl is the key that prevent upgrading. The Package is too old and lack for updating. May be you shall raise an issue there.

PhyX-Meow avatar Aug 28 '22 08:08 PhyX-Meow

See this for some discussion https://discourse.julialang.org/t/state-of-plotlyjs-and-support-packages/86119

PhyX-Meow avatar Aug 28 '22 08:08 PhyX-Meow