Is Pluto not (yet?) supported by Julia v1.9?

Hi guys, for many reasons I need Julia v1.9 for my project, but I get the errors below.
Any cue?

Julia Version 1.9.0 (2023-05-07)
Official release

julia> using Pluto


Opening http://localhost:1234/?secret=WFDFZ6QF in your default browser... ~ have fun!

Press Ctrl+C in this terminal to stop Pluto

WARNING: both IOExtras and Base export "closewrite"; uses of it in module ConnectionPool must be qualified
WARNING: both IOExtras and Base export "closewrite"; uses of it in module Servers must be qualified
WARNING: both IOExtras and Base export "closewrite"; uses of it in module WebSockets must be qualified
WARNING: both IOExtras and Base export "closewrite"; uses of it in module HTTP must be qualified
┌ Error: error handling request
│   exception =
│    UndefVarError: `closewrite` not defined
│    Stacktrace:
│     [1] (::Pluto.var"#233#243"{Pluto.ServerSession, Base.RefValue{Function}, HTTP.Handlers.Router{Symbol("##292")}})(http::HTTP.Streams.Stream{HTTP.Messages.Request, HTTP.ConnectionPool.Transaction{Sockets.TCPSocket}})
│       @ Pluto ~/.julia/packages/Pluto/D9HrI/src/webserver/WebServer.jl:235
│     [2] handle
│       @ ~/.julia/packages/HTTP/RwjlP/src/Handlers.jl:270 [inlined]
│     [3] #4
│       @ ~/.julia/packages/HTTP/RwjlP/src/Handlers.jl:346 [inlined]
│     [4] macro expansion
│       @ ~/.julia/packages/HTTP/RwjlP/src/Servers.jl:399 [inlined]
│     [5] (::HTTP.Servers.var"#13#14"{HTTP.Handlers.var"#4#5"{HTTP.Handlers.StreamHandlerFunction{Pluto.var"#233#243"{Pluto.ServerSession, Base.RefValue{Function}, HTTP.Handlers.Router{Symbol("##292")}}}}, HTTP.ConnectionPool.Transaction{Sockets.TCPSocket}, HTTP.Streams.Stream{HTTP.Messages.Request, HTTP.ConnectionPool.Transaction{Sockets.TCPSocket}}})()
│       @ HTTP.Servers ./task.jl:514
└ @ HTTP.Servers ~/.julia/packages/HTTP/RwjlP/src/Servers.jl:405

It’s working OK for me here, using [c3e4b0f8] Pluto v0.19.26.

As a first step, create a new temporary environment/project and see how it runs.

Pluto v0.19.26 Works Okay for me
Can you check if your Manifest has updated Pluto?

I try tu update Pluto:

julia> import Pkg

julia> Pkg.update(“Pluto”)

Updating registry at ~/.julia/registries/General.toml

No Changes to ~/.julia/environments/v1.9/Project.toml

No Changes to ~/.julia/environments/v1.9/Manifest.toml

julia> using Pluto

but the version is not changed:

(@v1.9) pkg> st

Status ~/.julia/environments/v1.9/Project.toml

[8f4d0f93] Conda v1.8.0

⌅ [864edb3b] DataStructures v0.17.20

[f7f18e0c] GLFW v3.4.1

[7073ff75] IJulia v1.24.0

[524e6230] IntervalTrees v1.1.0

[95167b0c] LinearAlgebraicRepresentation v1.0.0 ~/Documents/dev/LinearAlgebraicRepresentation

[66fc600b] ModernGL v1.1.7

[b8a86587] NearestNeighbors v0.4.13

[e701d7ec] Plasm v0.6.0

⌃ [c3e4b0f8] Pluto v0.14.7

[438e738f] PyCall v1.95.1

[295af30f] Revise v3.5.2

[56f361f5] Triangle v0.3.2

[f7e6ffb2] Triangulate v2.2.0

[32496ab8] ViewerGL v0.1.0 /Users/paoluzzi/Documents/dev/ViewerGL.jl#master

[37e2e46d] LinearAlgebra

[2f01184e] SparseArrays

Info Packages marked with ⌃ and ⌅ have new versions available, but those with ⌅ are restricted by compatibility constraints from upgrading. To see why use status --outdated

same in .julia/environments/v1.9/Manifest.toml

How to update Pluto versio?
Thanks for help …

You probably have too many packages loaded into your current environment. My v1.9 environment is almost completely empty. You should probably just created a special environment just for Pluto. There is very little reason to have any other package in the same environment since each notebook creates it’s own environment anyways.

Below I demonstrate how to create a global shared environment called “plutoenv”. You can access this from any directory by activating @plutoenv.

using Pkg
Pkg.activate("plutoenv"; shared = true)
using Pluto


using Pkg
pkg"activate @plutoenv"
pkg"add Pluto"
using Pluto

But isn’t this a bit strange? Shouldn’t ^ indicate that there is a newer version and that it can be updated?

That’s correct. The current version of Pluto is v0.19.26. What I don’t know and do not care about is what else is in the environment that is preventing Pluto from being upgraded.

Done the above suggestion. Now it seems to work

using Pluto v0.19.26 . Thank you all

Yeah, I know there is a newer version. I was more thinking of the

can be updated


My understanding was that if there is anything preventing it from updating it should be instead of ^, but maybe that is not required, we just know that if there is a there is something stopping it?

To start Pluto from the command line, I would just do the following.

julia --project=@plutoenv -e "using Pluto;"

Alternatively, I also have an executable script in my ~/bin that looks like this:

#!/bin/env julia
using Pkg
Pkg.activate("plutoenv"; shared = true)

using Pluto

can” is a bit of a weasel word in documentation, particularly when combined with the passive voice. It implies possibility and permission, but not necessarily a promise or guarantee of a successful outcome.


“the .julia directory can be deleted at any time”

This is either reassuring or worrying, depending on your point of view, and how you interpret the word “can”.

I think that the “can” in “the package can be updated” is more about the fact that there’s a possibility of it being updated, because there’s a new version available. Pkg’s up won’t break your project, so it won’t necessarily attempt an update, even if it’s possible.

Documentation can be difficult… :slight_smile:

1 Like

Haha, sorry if I’m making this confusing, I don’t seem to be able to convey what I’m actually wondering here.

The sentence

was from me, maybe that is how it is worded in the documentation (though I can’t find it there), but I was just assuming things based on this sentence from OP

together with the fact that a package that was marked with ^ did not seem to want to update for OP.

So my question should maybe have been: shouldn’t a package that can’t update be marked with instead of ^?

I’m not 100% sure as I can’t find an MWE currently but I think ^ is for multiple possible resolver states where not all packages can be at the latest version but you could update the one marked ^ which will trigger a downgrade of some other package, while means you couldn’t update it at all without removing some other package from the environment.

1 Like