# Pkg output doesn't show in PlutoUI with\_terminal() in Julia 1.6.1

**URL:** <https://discourse.julialang.org/t/pkg-output-doesnt-show-in-plutoui-with-terminal-in-julia-1-6-1/60819>\
**Category:** Pluto\
**Tags:** pkg\
**Created:** [May 9, 2021, 12:12pm UTC](https://discourse.julialang.org/t/pkg-output-doesnt-show-in-plutoui-with-terminal-in-julia-1-6-1/60819 "2021-05-09T12:12:00Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![hellemo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/hellemo/32/324_2.png) [@hellemo](https://discourse.julialang.org/u/hellemo)\
**Post date:** [May 9, 2021, 12:12pm UTC](https://discourse.julialang.org/t/pkg-output-doesnt-show-in-plutoui-with-terminal-in-julia-1-6-1/60819/1 "2021-05-09T12:12:00Z")

</div>

With julia 1.6.0 everything works as expected, however the output doesn’t show in 1.6.1:  
1.6.0:

 ![image](https://global.discourse-cdn.com/julialang/original/3X/9/9/99896ae549aa0d0dbea8b6dc14e9ccdb5abd1610.png)  
1.6.1:  
 ![image](https://global.discourse-cdn.com/julialang/original/3X/f/b/fbf20569ef150441ee33e19a789a6e1452ae46bc.png)

What’s going on here, is this a bug in julia and/or PlutoUI?

Code to reproduce below

```julia
begin
	using Pkg;
	Pkg.add("PlutoUI")
	using PlutoUI
end

```

```julia
with_terminal() do
	println(VERSION)
	Pkg.activate(".")
end

```

```julia
with_terminal() do
	Pkg.status()
end

```

---

<div class="post-metadata">

**Author:** ![ederag](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ederag/32/4106_2.png) [@ederag](https://discourse.julialang.org/u/ederag)\
**Post date:** [May 9, 2021, 5:03pm UTC](https://discourse.julialang.org/t/pkg-output-doesnt-show-in-plutoui-with-terminal-in-julia-1-6-1/60819/2 "2021-05-09T17:03:39Z")

</div>

Confirmed:  
julia-1.6.1:

 ![Screenshot_20210509_174656](https://global.discourse-cdn.com/julialang/original/3X/2/3/23c8609155fa85ea4f699db88162d4368ab6ffd3.png)

julia-1.6.0:

 ![Screenshot_20210509_174922](https://global.discourse-cdn.com/julialang/original/3X/b/1/b13da023663599fe48be2c802156ef66aff1cb76.png)

`Pluto v0.14.5`

Seems worth reporting to [Issues · JuliaPluto/PlutoUI.jl · GitHub](https://github.com/fonsp/PlutoUI.jl/issues)

---

<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:** [May 9, 2021, 6:34pm UTC](https://discourse.julialang.org/t/pkg-output-doesnt-show-in-plutoui-with-terminal-in-julia-1-6-1/60819/3 "2021-05-09T18:34:22Z")

</div>

I think that’s a Julia issue, fixed in [https://github.com/JuliaLang/Pkg.jl/pull/2543](https://github.com/JuliaLang/Pkg.jl/pull/2543)

---

<div class="post-metadata">

**Author:** ![hellemo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/hellemo/32/324_2.png) [@hellemo](https://discourse.julialang.org/u/hellemo)\
**Post date:** [May 9, 2021, 7:10pm UTC](https://discourse.julialang.org/t/pkg-output-doesnt-show-in-plutoui-with-terminal-in-julia-1-6-1/60819/4 "2021-05-09T19:10:45Z")

</div>

Thanks, yes I was reluctant to filing an issue at PlutoUI if it was indeed a Julia issue.

I looks like `import Pkg; Pkg.DEFAULT_IO[] = stdout` should be a workaround, but it seems to make no difference for me in 1.6.1, unfortunately.

---

<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:** [May 9, 2021, 8:31pm UTC](https://discourse.julialang.org/t/pkg-output-doesnt-show-in-plutoui-with-terminal-in-julia-1-6-1/60819/5 "2021-05-09T20:31:58Z")

</div>

> [@hellemo](#):
>
> I looks like `import Pkg; Pkg.DEFAULT_IO[] = stdout` should be a workaround, but it seems to make no difference for me in 1.6.1, unfortunately.

Since the redirection here happens in `with_terminal` you need to use this inside that, or simply pass `stdout` explicitly, e.g.

```julia
with_terminal() do
    Pkg.status(; io = stdout)
end

```

---

<div class="post-metadata">

**Author:** ![hellemo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/hellemo/32/324_2.png) [@hellemo](https://discourse.julialang.org/u/hellemo)\
**Post date:** [May 9, 2021, 9:07pm UTC](https://discourse.julialang.org/t/pkg-output-doesnt-show-in-plutoui-with-terminal-in-julia-1-6-1/60819/6 "2021-05-09T21:07:09Z")

</div>

That doesn’t work, unfortunately, maybe something else is going on here as well?

 ![image](https://global.discourse-cdn.com/julialang/original/3X/f/f/ff0e32bffbc638ce4dce666a7f2f334edafb44f1.png)

---

<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:** [May 10, 2021, 12:02pm UTC](https://discourse.julialang.org/t/pkg-output-doesnt-show-in-plutoui-with-terminal-in-julia-1-6-1/60819/7 "2021-05-10T12:02:55Z")

</div>

Looks like a Pluto bug then, since this also fails (prints to the wrong stdout):

```julia
with_terminal() do
    println(stdout, "hello, world")
end

```

---

<div class="post-metadata">

**Author:** ![hellemo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/hellemo/32/324_2.png) [@hellemo](https://discourse.julialang.org/u/hellemo)\
**Post date:** [May 10, 2021, 4:42pm UTC](https://discourse.julialang.org/t/pkg-output-doesnt-show-in-plutoui-with-terminal-in-julia-1-6-1/60819/8 "2021-05-10T16:42:09Z")

</div>

Thanks, that’s the same behavior in 1.6.0, though.

I gave it a shot in the latest nightly, where it works fine again, so it looks like it might be fixed with PR mentioned above:

 ![image](https://global.discourse-cdn.com/julialang/original/3X/b/e/be6bb93151c32b6cdb44f58226142bed2912973c.png)

---

<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:** [May 10, 2021, 4:44pm UTC](https://discourse.julialang.org/t/pkg-output-doesnt-show-in-plutoui-with-terminal-in-julia-1-6-1/60819/9 "2021-05-10T16:44:13Z")

</div>

> [@hellemo](#):
>
> Thanks, that’s the same behavior in 1.6.0, though.

Yea, since it is a bug in Pluto I am guessing it applies to all Julia versions.

---

<div class="post-metadata">

**Author:** ![hellemo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/hellemo/32/324_2.png) [@hellemo](https://discourse.julialang.org/u/hellemo)\
**Post date:** [May 10, 2021, 4:55pm UTC](https://discourse.julialang.org/t/pkg-output-doesnt-show-in-plutoui-with-terminal-in-julia-1-6-1/60819/10 "2021-05-10T16:55:35Z")

</div>

Right. It has to do with PlutoUI’s `with_terminal` using the `Suppressor.jl` macro `@capture_out` to capture the stdout, I think, but I couldn’t figure out exactly what the problem was.

In case anyone wants to have a closer look, that is.

---

<div class="post-metadata">

**Author:** ![jjgomezcadenas](https://avatars.discourse-cdn.com/v4/letter/j/50afbb/32.png) [@jjgomezcadenas](https://discourse.julialang.org/u/jjgomezcadenas)\
**Post date:** [March 21, 2022, 8:54am UTC](https://discourse.julialang.org/t/pkg-output-doesnt-show-in-plutoui-with-terminal-in-julia-1-6-1/60819/11 "2022-03-21T08:54:50Z")

</div>

Hi, still no solution to this issue? Does that mean that with\_terminal can’t be used in new versions of Pluto?

---

<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:** [March 21, 2022, 9:15am UTC](https://discourse.julialang.org/t/pkg-output-doesnt-show-in-plutoui-with-terminal-in-julia-1-6-1/60819/12 "2022-03-21T09:15:50Z")

</div>

Newer Pluto version actually capture output to the terminal directly and display it in the notebook without any user intervention:

![image](https://global.discourse-cdn.com/julialang/original/3X/3/8/38fd26037eb969cb64c5536137b6d04205dc5b99.png)

---

<div class="post-metadata">

**Author:** ![jjgomezcadenas](https://avatars.discourse-cdn.com/v4/letter/j/50afbb/32.png) [@jjgomezcadenas](https://discourse.julialang.org/u/jjgomezcadenas)\
**Post date:** [March 21, 2022, 9:26am UTC](https://discourse.julialang.org/t/pkg-output-doesnt-show-in-plutoui-with-terminal-in-julia-1-6-1/60819/13 "2022-03-21T09:26:56Z")

</div>

Then I don’t understand what I do wrong. In my case:  
Pkg.status() (in notebook)

[7f904dfe] PlutoUI v0.7.37 (in terminal, nothing shows up in notebooks)  
From worker 2: [b77e0a4c] InteractiveUtils  
From worker 2: [d6f4376e] Markdown  
From worker 2: [44cfe95a] Pkg  
From worker 2: [de0858da] Printf

---

<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:** [March 21, 2022, 11:03am UTC](https://discourse.julialang.org/t/pkg-output-doesnt-show-in-plutoui-with-terminal-in-julia-1-6-1/60819/14 "2022-03-21T11:03:38Z")

</div>

Which Pluto version are you using?

---

<div class="post-metadata">

**Author:** ![jjgomezcadenas](https://avatars.discourse-cdn.com/v4/letter/j/50afbb/32.png) [@jjgomezcadenas](https://discourse.julialang.org/u/jjgomezcadenas)\
**Post date:** [March 21, 2022, 11:56pm UTC](https://discourse.julialang.org/t/pkg-output-doesnt-show-in-plutoui-with-terminal-in-julia-1-6-1/60819/15 "2022-03-21T23:56:50Z")

</div>

Version 0.18.
